/* --- Global Styles & Variables --- */
:root {
  --bg-color: #1a3a5a; /* Deep Blue from image - Used for Hero/Footer */
  --primary-gold: #d4af37; /* A classic gold */
  --accent-gold: #e0c080; /* Lighter gold from elements */
  --light-cream: #f5f1e8; /* Cream background - Used for Main Content */
  --accent-blue: #a0d2e8; /* Light blue planet/accents */
  --text-light: #f0f0f0; /* Light text (on dark backgrounds) */
  --text-dark: #1f2937; /* Dark text (on light backgrounds) */
  --text-muted-dark: #4a5a7a; /* Muted dark text (on light backgrounds) */
  --text-muted-light: rgba(240, 240, 240, 0.7); /* Muted light text (on dark backgrounds) */
  --text-hero-light: #e0e8f0; /* Slightly muted light text for hero subtitle */

  --heading-font: 'Cinzel', serif;
  --body-font: 'Lora', serif;

  --star-color: var(--accent-gold);
  --border-color-light-on-dark: rgba(224, 192, 128, 0.2); /* Light gold border (on dark bg) */
  --border-color-medium-on-dark: rgba(224, 192, 128, 0.4); /* Medium gold border (on dark bg) */
  --border-color-light-on-light: rgba(26, 58, 90, 0.15);  /* Light dark border (on light bg) */
  --border-color-medium-on-light: rgba(26, 58, 90, 0.25); /* Medium dark border (on light bg) */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.astrology-optin {
  /* Default background (affects area outside main sections if needed) */
  background-color: var(--bg-color);
  /* Default text color (expect override in light sections) */
  color: var(--text-light);
  font-family: var(--body-font);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  opacity: 0;
  animation: fadeInBody 1.5s 0.5s ease-out forwards;
}

@keyframes fadeInBody {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Background Elements --- */
.stars-background {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -2; overflow: hidden;
  background-color: var(--bg-color); /* Ensure stars are on dark bg */
}

.star {
  position: absolute;
  background-color: var(--star-color);
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 7s infinite ease-in-out;
  box-shadow: 0 0 4px var(--star-color);
}
.star1 { top: 10%; left: 15%; animation-delay: 0s; width: 3px; height: 3px; }
.star2 { top: 25%; left: 85%; animation-delay: 1.5s; width: 2px; height: 2px; }
.star3 { top: 70%; left: 50%; animation-delay: 0.6s; width: 1px; height: 1px; }
.star4 { top: 88%; left: 20%; animation-delay: 2.8s; width: 2px; height: 2px; }
.star5 { top: 5%; left: 90%; animation-delay: 3.2s; width: 3px; height: 3px;}
.star6 { top: 55%; left: 5%; animation-delay: 1.9s; width: 1px; height: 1px; }
.star7 { top: 30%; left: 35%; animation-delay: 4.5s; width: 2px; height: 2px;}
.star8 { top: 78%; left: 75%; animation-delay: 0.9s; width: 1px; height: 1px; }
.star9 { top: 15%; left: 60%; animation-delay: 2.1s; width: 2px; height: 2px; }
.star10 { top: 95%; left: 40%; animation-delay: 5.0s; width: 1px; height: 1px; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

.decorative-lines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.08;
    background-image:
        linear-gradient(45deg, var(--accent-gold) 1px, transparent 1px),
        linear-gradient(-45deg, var(--accent-gold) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
}

/* --- Hero Banner (Dark Background) --- */
.hero-banner {
    display: flex; /* Keep flex to center the inner container vertically/horizontally */
    align-items: center; /* Vertically center */
    justify-content: center; /* Horizontally center the inner container */
    min-height: 75vh;
    padding: 4rem clamp(1rem, 8vw, 6rem) 2rem; /* Keep padding on the outer banner */
    position: relative;
    overflow: hidden;
    /* Optional: Add background image if you have one */
    background:url('images/bg.png') no-repeat center center / cover;
    background-color: var(--bg-color); /* Ensure hero has dark background */
    color: var(--text-light); /* Default text color for hero */
}

/* New container for hero content */
.hero-inner-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping if illustration is added */
    align-items: center;
    justify-content: space-between; /* Content and illustration space apart */
    gap: 2rem;
    width: 100%; /* Take full width up to max-width */
    max-width: 1100px; /* <<< KEY CHANGE: Match max-width of main content blocks */
}


.hero-content {
    flex: 1; /* Takes available space, pushes illustration right if present */
    min-width: 300px;
    max-width: 600px; /* Limit width of text block for readability */
    z-index: 1;
    /* text-align: left; /* Default text alignment */
}

.hero-content h1 {
    font-family: var(--heading-font);
    color: var(--accent-gold);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.2;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    margin-bottom: 1rem;
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-hero-light);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
    font-style: italic;
}

.logo {
    margin-bottom:20px;
    display:block;
}

.logo img {
    max-width:100%;
    width:400px;
}

/* Form styling in Hero */
#newsletter-form {
    margin-top: 1.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--border-color-medium-on-dark); /* Gold border */
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--body-font);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-dark); /* Dark text inside input */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 200px;
}
#newsletter-form input[type="email"]:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.4);
    outline: none;
    background-color: #fff;
}

#newsletter-form button {
    padding: 0.9rem 1.5rem;
    background-color: var(--primary-gold);
    color: var(--bg-color); /* Dark blue text on gold button */
    border: 1px solid var(--primary-gold);
    border-radius: 4px;
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#newsletter-form button:hover,
#newsletter-form button:focus {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    outline: none;
}

.privacy-note.hero-privacy {
    font-size: 0.85rem;
    color: var(--text-muted-light); /* Muted light text */
    margin-top: 1rem;
    font-style: italic;
}

/* Illustration styling (if added back) */
.hero-illustration {
    flex-basis: 40%;
    max-width: 450px;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

.hero-illustration img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
}

/* --- Main Content Area (Light Cream Background) --- */
.main-content {
    padding: 4rem clamp(1rem, 8vw, 6rem); /* Consistent padding with hero */
    background-color: var(--light-cream); /* The desired light background */
    color: var(--text-dark); /* Default text color for this section */
    /* Optional: border between hero and content if needed */
    /* border-top: 2px solid var(--primary-gold); */
}

.section-title {
    font-family: var(--heading-font);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: var(--bg-color); /* Dark blue title on light background */
    text-align: center;
    margin-bottom: 3rem; /* Increased margin */
    font-weight: 700;
    position: relative;
    letter-spacing: 1px;
}
/* Decorative element for titles (darker lines) */
.section-title span {
    position: relative;
    display: inline-block;
}
.section-title span::before,
.section-title span::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background-color: rgba(26, 58, 90, 0.3); /* Darker line color */
    opacity: 0.7;
}
.section-title span::before {
    left: -55px;
}
.section-title span::after {
    right: -55px;
}

.section-divider {
    padding-top: 0; /* Remove top padding if margin-bottom on prev section is enough */
    padding-bottom: 4rem; /* Add space before the next section */
    margin-bottom: 4rem; /* Add space after the divider */
    border-bottom: 1px dashed rgba(26, 58, 90, 0.2); /* Darker dashed line */
}
/* Remove divider after the last section */
.main-content section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* If you prefer dividers strictly *between* sections, remove .section-divider class from sections */
/* and add margin-bottom to each section instead, then style a general hr or pseudo-element */


/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    max-width: 1100px; /* <<< Match max-width */
    margin: 0 auto;
    text-align: center;
}

.feature-item {
    background: rgba(26, 58, 90, 0.02); /* Very subtle dark tint */
    padding: 2rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color-light-on-light); /* Light dark border */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--border-color-medium-on-light); /* Medium dark border */
}

.feature-item h3 {
    font-family: var(--heading-font);
    color: var(--bg-color); /* Dark blue heading */
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-dark); /* Standard dark text */
    opacity: 0.9;
    line-height: 1.6;
}

.decorative-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--primary-gold); /* Gold icons stand out well */
  opacity: 0.9;
}

/* About Astrology Section */
.about-astrology {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    max-width: 1100px; /* <<< Match max-width */
    margin: 0 auto; /* Center the container */
}

.about-astrology .content-column {
    flex: 1.5;
    min-width: 300px;
    text-align: left; /* Align text left by default */
}
.about-astrology .content-column p {
    margin-bottom: 1.5rem;
    color: var(--text-dark); /* Ensure dark text */
    opacity: 0.95;
}
.about-astrology .content-column .section-title {
    text-align: left; /* Override general centered title */
    margin-bottom: 1.5rem;
}
/* Adjust decorative lines for left-aligned title */
.about-astrology .content-column .section-title span::before { display: none; } /* Hide left line */
.about-astrology .content-column .section-title span::after {
    right: auto; /* Reset right positioning */
    left: calc(100% + 15px); /* Position after the text */
    width: 50px; /* Adjust width if needed */
}


.about-astrology .decoration-column {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Astrolabe Graphic (looks good with gold/cream colors) */
.astrolabe-graphic {
  width: clamp(180px, 25vw, 220px);
  height: clamp(180px, 25vw, 220px);
  background: radial-gradient(circle, #f0e0b0, var(--accent-gold));
  border-radius: 50%;
  /* Use a gold border that contrasts with cream */
  border: 4px solid var(--primary-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), inset 0 0 10px rgba(0,0,0,0.1);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slowRotate 90s linear infinite;
}
.astrolabe-graphic .inner-circle1 {
    width: 70%; height: 70%; border: 1px dashed rgba(0,0,0,0.2); border-radius: 50%;
}
.astrolabe-graphic .inner-circle2 {
    position: absolute; width: 40%; height: 40%; border: 1px solid rgba(0,0,0,0.3); border-radius: 50%;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Zodiac Preview Section (If uncommented in HTML) */
.zodiac-preview {
    text-align: center;
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 2rem auto 0; /* Add top margin */
}

.zodiac-sign {
    font-family: var(--heading-font);
    color: var(--bg-color); /* Dark blue text */
    border: 1px solid var(--border-color-light-on-light); /* Light dark border */
    padding: 0.8rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: rgba(26, 58, 90, 0.03); /* Subtle dark tint */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: default;
}
.zodiac-sign:hover {
    background-color: rgba(26, 58, 90, 0.08); /* Slightly darker tint */
    color: var(--primary-gold); /* Gold text on hover */
    border-color: var(--border-color-medium-on-light); /* Medium dark border */
}


/* --- Footer (Dark Background again) --- */
.site-footer {
  background-color: var(--bg-color); /* Dark background */
  color: var(--text-muted-light); /* Muted light text */
  padding: 3rem clamp(1rem, 8vw, 6rem);
  text-align: center;
  border-top: 3px solid var(--primary-gold); /* Gold border separator */
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

.site-footer .footer-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-gold); /* Gold icon */
    opacity: 0.8;
}

.site-footer h2 {
  font-family: var(--heading-font);
  color: var(--accent-gold); /* Gold heading on dark footer */
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.site-footer p, .site-footer a {
   color: var(--text-muted-light); /* Muted light text */
   font-size: clamp(0.9rem, 2.2vw, 1rem);
   line-height: 1.7;
   margin-bottom: 1.5rem;
}

.copyright {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: rgba(224, 232, 240, 0.6); /* Very muted light text */
}


/* --- Form Message Styling (Used in Hero) --- */
.form-message {
  margin-top: 0.8rem;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: none; /* Hidden by default */
  text-align: center;
  /* Colors suitable for dark background */
}
.form-message.success {
  color: #c1f0d8; /* Light green text */
  background-color: rgba(15, 81, 50, 0.7); /* Dark green background */
  border: 1px solid #2f6e4e;
  display: block;
}
.form-message.error {
   color: #f8d7da; /* Light red text */
   background-color: rgba(132, 32, 41, 0.7); /* Dark red background */
   border: 1px solid #a33d46;
   display: block;
}
.form-message.loading {
   color: var(--text-hero-light);
   background-color: rgba(74, 90, 122, 0.5); /* Muted background */
   border: 1px solid var(--text-muted-light);
   display: block;
}

/* --- Screen Reader Only --- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}


/* --- Responsiveness --- */
@media (max-width: 992px) {
    .hero-banner {
        padding-top: 3rem;
        padding-bottom: 3rem;
        min-height: unset;
        text-align: center; /* Center text within hero-content when stacked */
    }

    .hero-inner-container {
        flex-direction: column; /* Stack content and illustration */
        justify-content: center; /* Center items vertically when stacked */
        text-align: center; /* Ensure content inside centers */
        gap: 1rem; /* Adjust gap for stacked layout */
        max-width: 700px; /* Maybe reduce max-width slightly on tablets */
    }

    .hero-content {
        max-width: 100%; /* Allow content to take full width */
        order: 1; /* Keep content above illustration */
        text-align: center; /* Explicitly center text */
    }

    /* Form adjustments for centering */
    #newsletter-form {
        max-width: 450px; /* Limit form width for better centering */
        margin-left: auto;
        margin-right: auto;
    }

    .hero-illustration { /* If you add it back */
        order: 2;
        margin-top: 2rem;
        max-width: 350px; /* Adjust illustration size */
        width: 100%; /* Ensure it doesn't overflow */
        flex-basis: auto; /* Reset flex-basis */
    }

    .about-astrology {
        flex-direction: column;
        text-align: center;
        max-width: 700px; /* Match hero inner container */
    }
    /* Center the 'About' section title and adjust lines */
    .about-astrology .content-column {
        text-align: center;
    }
    .about-astrology .content-column .section-title {
        text-align: center;
    }
    .about-astrology .content-column .section-title span::before {
        display: block; /* Show left line again */
        left: -45px;
        width: 30px;
    }
    .about-astrology .content-column .section-title span::after {
        left: auto; /* Reset left */
        right: -45px; /* Position right again */
        width: 30px;
    }
    .about-astrology .decoration-column {
        margin-top: 1rem; /* Add some space above graphic */
    }

     .features-grid {
        max-width: 700px; /* Match hero inner container */
    }
}

@media (max-width: 768px) {
    .main-content, .site-footer, .hero-banner {
         padding-left: clamp(1rem, 5vw, 2rem); /* Adjust padding */
         padding-right: clamp(1rem, 5vw, 2rem);
    }

    .section-title span::before,
    .section-title span::after {
        width: 25px;
    }
    .section-title span::before { left: -40px; }
    .section-title span::after { right: -40px; }

    /* Ensure left-aligned title lines work */
    .about-astrology .content-column .section-title span::before { left: -40px; }
    .about-astrology .content-column .section-title span::after { right: -40px; }


    .features-grid {
        grid-template-columns: 1fr; /* Stack features */
        gap: 1.5rem;
        max-width: 500px; /* Further constrain width */
    }
    .about-astrology {
         max-width: 500px; /* Further constrain width */
    }
    .hero-inner-container {
         max-width: 500px; /* Further constrain width */
    }

    /* Zodiac grid if used */
    .zodiac-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.8rem;
        max-width: 500px; /* Match other sections */
    }
}

@media (max-width: 480px) {
    body.astrology-optin { font-size: 15px; line-height: 1.6; }
    .hero-banner, .main-content, .site-footer {
         padding-left: 1rem; padding-right: 1rem; /* Minimum padding */
    }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content .subtitle { font-size: 1rem; }

    /* Form elements stack */
    .form-row { flex-direction: column; gap: 0.8rem; }
    #newsletter-form button { width: 100%; }
    #newsletter-form {
        max-width: none; /* Remove max-width for full width */
        margin-left: 0;
        margin-right: 0;
     }

    .section-title { font-size: 1.6rem; margin-bottom: 2rem; }
    /* Hide title lines on smallest screens */
    .section-title span::before,
    .section-title span::after {
       display: none;
    }

    /* Zodiac grid if used */
    .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
    .zodiac-sign { font-size: 0.85rem; padding: 0.6rem 0.4rem;}
}