/* index.css - Styles for the headline carousel on the landing page */
/* Assumes it's loaded inside the .main-content area from template.php */

/* Make the main content area a flex container to enable vertical centering */
/* Adjust selector if your template uses a different class for main content */
body > div.grid-page > main.main-content, /* Specificity for template structure */
.main-content {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically center content */
  align-items: center;     /* Horizontally center content */
  min-height: calc(100vh - (var(--app-header-height) + var(--app-footer-height))); /* Account for fixed header/footer */
  padding: calc(var(--app-header-height) + 0px) 20px calc(var(--app-footer-height) + 20px); /* Adjust padding if needed */
  text-align: center; /* Center text inside */
  position: relative; /* For potential absolute positioning of CTA */
}

/* Style the main stage/quote area */
#stage {
  width: 100%;
  max-width: 800px; /* Limit width for readability */
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  /* Add a subtle background or border if desired for better definition */
  /* background-color: rgba(255, 255, 255, 0.05); */
  /* border-radius: 8px; */
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

/* Style the headline text */
#quote {
  font-family: var(--font-headline, 'Archivo Narrow', Arial, sans-serif); /* Use template font if available */
  font-size: clamp(1.5rem, 4vw, 2.5rem); /* Responsive font size */
  font-weight: bold;
  line-height: 1.3;
  margin: 0 0 20px 0; /* Add space below the quote */
  opacity: 0;
  transition: opacity 1s ease-in-out;
  color: var(--color-text, #eee); /* Use template text color token */
}

#quote.show {
  opacity: 1;
}

#quote.hide {
  opacity: 0;
}

/* Style the source link */
#source {
  font-family: var(--font-text, Georgia, 'Times New Roman', serif); /* Use template font if available */
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic;
  margin: 0 0 30px 0; /* Increase space below the source to accommodate dots */
  opacity: 0;
  transition: opacity 1s ease-in-out;
  color: var(--color-text, #eee); /* Use template text color token */
}

#source.show {
  opacity: 1;
}

#source.hide {
  opacity: 0;
}

#sourceLink {
  color: var(--color-link, #4da6ff); /* Use template link color token */
  text-decoration: none;
}

#sourceLink:hover,
#sourceLink:focus {
  color: var(--color-link-hover, #0080ff); /* Use template hover color token */
  text-decoration: underline;
}

/* Style the progress dots container - FIXED POSITION */
#dots {
  position: fixed; /* Keep it in a fixed position */
  /* Position it relative to the viewport */
  /* Place it below the main centered content but above the footer */
  /* Adjust these values as needed for your layout */
  bottom: calc(var(--app-footer-height) + 130px); /* e.g., 130px above the footer */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
  z-index: 100; /* Make sure it's above other content but below potential modals/popups */
  margin: 0; /* Remove any default margins */
  padding: 10px 0; /* Add some padding for visual breathing room */
  background-color: rgba(228, 228, 228, 0.0); /* Optional subtle background for better visibility */
  border-radius: 10px; /* Optional rounding */
  padding-left: 10px; /* Match padding on both sides */
  padding-right: 10px;
}

/* Style individual dots */
.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(125, 125, 125, 0.3); /* Inactive dot color */
  margin: 0 5px;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: var(--color-link, #4da6ff); /* Active dot color uses link token */
}


/* Style the CTA section (hidden initially, shown by JS) */
#cta {
  position: absolute; /* Take it out of the normal flow */
  bottom: calc(var(--app-footer-height) + 20px); /* Position above the footer */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
  width: 100%;
  max-width: 600px;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  /* Ensure it's visible if it overlaps with stage on small screens */
  z-index: 10;
  /* Optional background for better visibility */
  /* background-color: rgba(28, 28, 28, 0.8); */
  /* border-radius: 8px; */
}

#cta.show {
  opacity: 1;
}

.cta-line {
  font-family: var(--font-text, Georgia, 'Times New Roman', serif);
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--color-text, #eee);
}

#startBtn {
  display: inline-block;
  font-family: var(--font-headline, 'Archivo Narrow', Arial, sans-serif);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 12px 24px;
  background-color: var(--color-cta-bg, #4da6ff); /* Use CTA token */
  color: var(--color-cta-text, #ffffff);
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#startBtn:hover,
#startBtn:focus {
  background-color: var(--color-cta-hover, #0080ff); /* Use CTA hover token */
  outline: 2px solid var(--color-cta-hover, #0080ff);
  outline-offset: 2px;
}

/* --- Existing CSS ... --- */

/* --- Cookie Popup Styles (Skeleton) --- */
/* Basic positioning - fixed at the bottom */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Or right: 20px; */
    width: calc(100% - 40px); /* Adjust based on left/right spacing */
    max-width: 400px; /* Limit width on larger screens */
    background-color: var(--color-header-bg); /* Match header/footer background */
    background-image: var(--color-header-bg-image);
    color: var(--color-header-text); /* Light text from theme */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1001; /* Should be higher than main content but maybe below modals if any */
    font-family: var(--font-text, Georgia, 'Times New Roman', serif); /* Use main font */
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-popup[aria-hidden="false"] {
    opacity: 1;
    transform: translateY(0);
}

.cookie-popup h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--font-headline, 'Archivo Narrow', Arial, sans-serif); /* Use headline font */
    font-size: 1.3rem;
    color: var(--color-link, #4da6ff); /* Use link color for heading */
}

.cookie-popup-text {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-policy-link {
    color: var(--color-link, #4da6ff); /* Match link color */
    text-decoration: underline;
}

.cookie-policy-link:hover,
.cookie-policy-link:focus {
    color: var(--color-link-hover, #0080ff); /* Match link hover color */
    text-decoration: none;
}

.cookie-popup-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap on very small screens */
}

.cookie-btn {
    flex: 1; /* Buttons share available space */
    min-width: 120px; /* Minimum width for buttons */
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-family: var(--font-headline, 'Archivo Narrow', Arial, sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cookie-btn-accept {
    background-color: var(--color-accent-success, #27ae60); /* Green for accept */
    color: #ffffff;
}

.cookie-btn-accept:hover,
.cookie-btn-accept:focus {
    filter: brightness(0.95);
    transform: translateY(-2px);
}

.cookie-btn-decline {
    background-color: var(--color-accent-neutral, #95a5a6); /* Neutral for decline/settings */
    color: #ffffff;
}

.cookie-btn-decline:hover,
.cookie-btn-decline:focus {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* ============== Responsive adjustments for popup */
@media (max-width: 768px) {
    .cookie-popup {
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none; /* Allow full width on small screens */
        bottom: 10px;
        padding: 15px;
    }

    .cookie-popup h3 {
        font-size: 1.2rem;
    }

    .cookie-popup-text {
        font-size: 0.9rem;
    }

    .cookie-btn {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cookie-popup {
        left: 5px;
        right: 5px;
        width: calc(100% - 10px);
        bottom: 5px;
        padding: 12px;
    }

    .cookie-popup-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 8px;
    }

    .cookie-btn {
        width: 100%; /* Full width buttons when stacked */
        min-width: auto;
    }
}
/* --- End Cookie Popup Styles --- */



/* --- Responsive Adjustments --- */

@media (max-width: 768px) {
  .main-content {
    padding: calc(var(--app-header-height) + 15px) 15px calc(var(--app-footer-height) + 15px) !Important;
    min-height: calc(100vh - (var(--app-header-height) + var(--app-footer-height)) - 200px) !Important;
  }

  #quote {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }

  #source {
    font-size: clamp(0.9rem, 3vw, 1rem);
    margin-bottom: 45px; /* Adjust space for dots on mobile */
  }

  .dot {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }

  #cta {
    bottom: calc(var(--app-footer-height) + 15px);
    padding: 15px;
    font-size: 1rem;
  }

  .cta-line {
    font-size: 1rem;
  }

  #startBtn {
    font-size: 1.1rem;
    padding: 10px 20px;
    margin-bottom: 150px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: calc(var(--app-header-height) + 10px) 50px calc(var(--app-footer-height) + 10px) 10px;
  }

  #quote {
    font-size: clamp(1.1rem, 6vw, 1.8rem);
  }

  #source {
    font-size: clamp(0.8rem, 3.5vw, 0.95rem);
  }

  .dot {
    width: 8px;
    height: 8px;
    margin: 0 3px;
	bottom: calc(var(--app-footer-height) + 170px) !Important; /* e.g., 170px above the footer */
  }


  #cta {
    bottom: calc(var(--app-footer-height) + 15px) !Important;
    padding: 10px;
  }

  .cta-line {
    font-size: 0.95rem;
  }

  #startBtn {
    font-size: 1rem;
    padding: 8px 16px;
  }
}
