/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.e-con-inner {
  padding: 0 !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--color-ink, #242429);
  background-color: #ffffff;
}

/* Photo of the Week specific styles */
.potw-section {
  width: 100%;
  background-color: #ffffff;
}

.potw-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.potw-header {
  margin-top: 50px;
  margin-bottom: 2rem;
}

.potw-header-flex {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.potw-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 0 20px !important;
}

.potw-btn {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 9999px;
  border: 2px solid #e2e8f0;
  background-color: transparent;
  color: var(--color-ink, #242429);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.potw-btn:hover:not(:disabled) {
  border-color: #FF447C;
  color: #FF447C;
}

.potw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.potw-btn svg {
  width: 1rem;
  height: 1rem;
}

.potw-select {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 2px solid #e2e8f0;
  background-color: #ffffff;
  color: var(--color-ink, #242429);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.potw-select:hover {
  border-color: #FF447C;
}

.potw-select:focus {
  border-color: #FF447C;
  box-shadow: 0 0 0 3px rgba(255, 68, 124, 0.1);
}

.potw-card {
  overflow: visible !important;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  height: auto !important;
  max-height: none !important;
  min-height: auto !important;
}

.potw-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  align-content: flex-start;
}

.potw-image-container {
  position: relative;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex-shrink: 1 !important;
  flex-grow: 0 !important;
  flex-basis: auto !important;
  align-self: flex-start;
  padding: 0 !important;
  margin: 0 !important;
}

.potw-image-wrapper {
  position: relative;
  overflow: visible !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  min-width: 100% !important;
}

/* Critical: The anchor link must fill the wrapper */
.potw-image-wrapper .featherlight-image {
  cursor: zoom-in;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.potw-image {
  width: 100% !important;
  height: auto !important;
  border-radius: 0.5rem;
  display: block;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: auto !important;
  box-sizing: border-box !important;
}

/* Image fills wrapper, wrapper fills container, container is 600px */
.potw-image-wrapper .potw-image {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

/* Ultimate override - force exact dimensions */
.potw-card .potw-grid .potw-image-container .potw-image-wrapper .potw-image {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  transform: none !important;
  zoom: 1 !important;
}

/* Mobile-specific fixes for image width and padding */
@media (max-width: 1023px) {
  .potw-card {
    padding: 0 1rem;
    overflow: hidden !important;
  }

  .potw-image-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .potw-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .potw-image-wrapper .featherlight-image {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .potw-card .potw-grid .potw-image-container .potw-image-wrapper .potw-image {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

.potw-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
}

@media (max-width: 768px) {
  .potw-badge {
    left: auto;
  }
}

.potw-badge-inner {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1rem;
  margin-left: 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.potw-badge-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ink, #242429);
}

.potw-badge-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FF447C;
}

.potw-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .potw-content {
    padding: 1.5rem 0 1.5rem 0;
  }
}

.potw-content-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 0 1 auto;
}

.potw-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-ink, #242429);
  line-height: 1.2;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.potw-description {
  font-size: 1rem;
  color: var(--color-ink, #242429);
  line-height: 1.625;
}

.potw-description a {
  color: #FF447C;
  text-decoration: none;
}

.potw-description a:hover {
  text-decoration: underline;
}

.potw-photographer {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.potw-photographer-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.potw-photographer-label svg {
  width: 1rem;
  height: 1rem;
  color: #FF447C;
}

.potw-photographer-label span {
  font-size: 0.875rem;
  color: var(--color-ink, #242429);
}

.potw-photographer-name {
  font-weight: 600;
  color: var(--color-ink, #242429);
}

.potw-cta {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.potw-cta-button {
  width: 100%;
  background-color: #FF447C;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.potw-cta-button:hover {
  background-color: #E62E6B;
  color: #ffffff;
}

.potw-cta-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.potw-cta-text {
  font-size: 0.875rem;
  color: var(--color-ink, #242429);
  text-align: center;
  margin-top: 0.75rem;
}

.potw-footer {
  margin-top: 2rem;
  text-align: center;
}

.potw-footer-text {
  font-size: 0.875rem;
  color: var(--color-ink, #242429);
  max-width: 42rem;
  margin: 0 auto;
  padding-bottom: 40px;
  line-height: 1.625;
}

.potw-caption {
  font-size: 0.875rem;
  color: var(--color-ink, #242429);
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 0;
  line-height: 1.625;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

/* Photo Transition Animations */
.potw-image-transition {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateX(0);
}

.potw-image-transition.fade-out {
  opacity: 0;
}

.potw-image-transition.fade-in-from-right {
  opacity: 0;
  transform: translateX(100px);
  animation: fadeInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.potw-image-transition.fade-in-from-left {
  opacity: 0;
  transform: translateX(-100px);
  animation: fadeInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInFromRight {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Content transition animations */
.potw-content-transition {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.potw-content-transition.content-fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.potw-content-transition.content-fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: contentFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Featherlight lightbox image styling */
.featherlight .featherlight-content img,
.featherlight .featherlight-content .featherlight-image,
.featherlight-content img {
  border-radius: 0.5rem !important;
}

.elementor-heading-title {
    font-weight: var(--e-global-typography-primary-font-weight);
    color: #242429 !important;
    padding: 20px 0 0 20px !important;
}

/* Responsive styles */
@media (min-width: 1024px) {
  .potw-container {
    padding: 0 1.5rem;
  }

  .potw-header {
    margin-top: 50px;
    margin-bottom: 2.5rem;
  }

  .potw-header-flex {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .potw-nav {
    gap: 0.75rem;
    padding: 20px 20px 0 120px !important;
  }

  .potw-btn {
    height: 2.5rem;
    width: 2.5rem;
  }

  .potw-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .potw-title {
    font-size: 1.875rem;
  }

  .potw-description {
    font-size: 1.125rem;
  }

  .potw-grid {
    flex-direction: row;
    gap: 2rem;
    align-items: stretch;
  }

  .potw-image-container {
    width: 600px !important;
    min-width: 600px !important;
    max-width: none !important;
    flex-basis: 600px !important;
  }

  .potw-image-wrapper {
    width: 100% !important;
    max-width: none !important;
  }

  .potw-image-wrapper .featherlight-image {
    width: 100% !important;
    display: block !important;
    max-width: none !important;
    min-width: 100% !important;
  }

  .potw-image {
    width: 100% !important;
    min-width: 100% !important;
  }

  .potw-image-wrapper .potw-image {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  /* Ultimate override */
  .potw-card .potw-grid .potw-image-container .potw-image-wrapper .potw-image {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    zoom: 1 !important;
    margin: 0 0 0px 20px !important;
  }

  .potw-image-wrapper {
    margin-bottom: 20px !important;
  }
}
