/* ===== Base Styles ===== */
:root {
    --primary-color: #1a3a6e;
    --secondary-color: #e67e22;
    --accent-color: #2c81ba;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0; /* Adjusted from 2rem 0 to give some space if it's the first element */
}

.section {
    padding: 4rem 0;
}

/* Header Styles */
.header-container {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    /* Mobile header height will be set in media query */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 100%; /* Ensure header fills header-container height */
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
}

.title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile menu toggle button styles */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other header content */
}

.menu-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
}

.menu-icon .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Mobile menu open state for icon */
.mobile-menu-toggle.active .bar:nth-child(1), /* Use .active class on button for icon change */
.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2),
.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3),
.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a.active { /* For current page indication */
    color: var(--secondary-color);
}

.main-nav a::after { /* Underline hover effect */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    /* margin-top: 80px; /* Original, will be adjusted for mobile */
    height: 80vh; /* Default height */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above video/image */
    color: var(--white);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    padding: 2rem;
    border-radius: var(--border-radius); /* Optional: rounded corners for the content box */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem; /* Adjusted from 2rem to give space for CTA if any */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-cta { /* If you add a CTA button in hero */
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.hero-cta:hover {
    background-color: var(--primary-color);
    color: var(--white); /* Ensure text color remains white on hover */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Overview Section */
.overview-section {
    padding: 4rem 0;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.column-text h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.column-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.column-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.column-image img {
    display: block;
    transition: var(--transition);
    width: 100%; /* Ensure image is responsive within its container */
    height: auto;
}

.column-image:hover img {
    transform: scale(1.03);
}

/* Devotional Store Section */
.devotional-section {
    background-color: #f8f9fb; /* Slightly off-white background */
    padding: 4rem 0;
    text-align: center;
}

.devotional-section h2 {
    font-size: 2rem; /* Adjusted for better hierarchy */
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem; /* Increased margin */
}

.devotional-store {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted minmax for slightly larger cards */
    gap: 2rem;
    margin-bottom: 2rem;
}

.devotional-item {
    background-color: var(--white);
    border-radius: 12px; /* Slightly more rounded corners */
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure items in a row have same height if content varies */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.devotional-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); /* Enhanced hover shadow */
}

.devotional-img {
    height: 250px; /* Fixed height for image container */
    overflow: hidden;
    position: relative; /* For potential overlay effects if added later */
}

.devotional-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area, might crop */
    transition: transform 0.3s ease;
}

.devotional-item:hover .devotional-img img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.devotional-info {
    padding: 1.5rem;
    text-align: left;
    flex-grow: 1; /* Allows this section to grow and push button down */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes button to bottom if content is short */
}

.devotional-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.95rem;
    color: var(--text-color); /* Changed from text-light for better readability */
    margin-bottom: 1rem;
    flex-grow: 1; /* Allows description to take available space */
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 6px; /* Consistent border radius */
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem; /* Slightly larger font */
    transition: background-color 0.3s ease, transform 0.3s ease;
    align-self: flex-start; /* Align button to the start of its flex container */
}

.download-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px); /* Button lift effect */
}

.purchase-note {
    font-size: 0.95rem;
    text-align: center;
    margin-top: 2rem; /* Space above the note */
    color: var(--text-color);
}

.purchase-note a {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 0;
}

.newsletter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background-color: var(--primary-color);
    padding: 3rem;
    border-radius: 10px;
    color: var(--white);
}

.newsletter-info h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--white); /* Ensure color is white as parent is primary */
}

.newsletter-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.newsletter-info ul {
    list-style: none; /* Removed default list style */
    padding-left: 0; /* Removed default padding */
    margin-top: 1.5rem;
}

.newsletter-info li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.8rem; /* Space for the icon */
}

.newsletter-info li::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900; /* Required for solid icons */
    position: absolute;
    left: 0;
    color: var(--secondary-color); /* Icon color */
}

.newsletter-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px; /* Match container's radius */
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color); /* Label color matching theme */
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2); /* Focus ring */
}

.form-group.checkbox { /* If you add a class for checkbox group */
    display: flex;
    align-items: center;
}

.form-group.checkbox label { /* Style for checkbox label */
    margin-bottom: 0;
    margin-left: 0.5rem;
    font-weight: normal;
    color: var(--text-color);
}

.subscribe-btn {
    display: inline-block; /* Changed to inline-block for better control if needed */
    width: 100%; /* Makes it full width in its container */
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 1.1rem;
}

.subscribe-btn:hover {
    background-color: #d35400; /* Darker shade of secondary color */
    transform: translateY(-3px);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none; /* Hidden by default, shown by JS */
}

.form-message.success {
    background-color: #d4edda; /* Green for success */
    color: #155724;
    display: block; /* JS will manage this */
}

.form-message.error {
    background-color: #f8d7da; /* Red for error */
    color: #721c24;
    display: block; /* JS will manage this */
}

/* Advertisement Section */
.advertisement-section {
    padding: 3rem 0;
    background-color: #f5f5f5;
    text-align: center;
}

.ad-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.ad-banner {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 300px;
    transition: transform 0.3s ease;
}

.ad-banner:hover {
    transform: translateY(-5px);
}

.ad-banner a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ad-content {
    padding: 1rem;
    text-align: left;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.ad-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.ad-cta {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.ad-section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.ad-section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 2rem 0; /* Added more top padding */
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem; /* Increased gap */
    margin-bottom: 2rem; /* Increased bottom margin */
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    position: relative;
}

.footer-section h3::after { /* Underline for footer headings */
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    margin-top: 0.5rem;
}

.footer-section p,
.footer-section a,
.footer-section li {
    color: var(--light-color); /* Ensure all text is light */
    line-height: 1.6;
}

.footer-section.about p {
    margin-bottom: 1rem;
}

.footer-section.links ul {
    list-style: none;
    padding-left: 0;
}

.footer-section.links li {
    margin-bottom: 0.6rem;
}

.footer-section.links a {
    text-decoration: none; /* Explicitly remove underline */
    display: inline-block;
    transition: var(--transition);
}

.footer-section.links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px); /* Slight move on hover */
}

.footer-section.contact p {
    display: flex;
    align-items: center; /* Align icon and text */
    gap: 0.5rem; /* Space between icon and text */
    margin-bottom: 0.8rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    background-color: rgba(255, 255, 255, 0.05); /* Subtle background */
    text-decoration: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Circular links */
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--white); /* Ensure icon color contrasts with new background */
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0 1rem; /* Adjusted padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Lighter border */
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 1024px) { /* Tablet and below */
    .two-column-layout,
    .newsletter-container {
        grid-template-columns: 1fr; /* Stack columns */
    }
    
    .column-image {
        order: -1; /* Image appears above text on mobile */
        max-width: 600px; /* Limit image width */
        margin: 0 auto 2rem auto; /* Center image and add bottom margin */
    }
    
    .newsletter-info {
        text-align: center; /* Center text in newsletter info */
    }
    
    .newsletter-info ul {
        max-width: 500px;
        margin: 1.5rem auto; /* Center list */
        padding-left: 0; /* Remove any default padding */
        text-align: left; /* Align list items to the left */
    }
}

@media (max-width: 768px) { /* Mobile specific styles */
    .header-container {
        height: 70px; /* Fixed header height for mobile */
    }

    .hero {
        margin-top: 70px; /* Adjust hero margin to account for fixed header */
        height: 70vh; /* Adjust hero height for mobile */
    }
    
    .hero-content h1 {
        font-size: 2.5rem; /* Adjust font size for mobile */
    }
    .hero-content p {
        font-size: 1.2rem; /* Adjust font size for mobile */
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger icon */
    }
    
    .main-nav {
        position: fixed;
        top: 70px; /* Position below the fixed header */
        left: -100%; /* Hidden off-screen */
        width: 100%;
        height: calc(100vh - 70px); /* Full height minus header */
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Align items to top */
        transition: var(--transition);
        padding: 2rem;
        overflow-y: auto; /* Scrollable if content exceeds height */
        z-index: 999; /* Below header's z-index but above content */
    }
    
    .main-nav.active,
    .main-nav[aria-expanded="true"] { /* When menu is open */
        left: 0; /* Slide in from left */
    }
    
    .main-nav ul {
        flex-direction: column; /* Stack links vertically */
        width: 100%;
        gap: 1.5rem; /* Space between links */
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eeeeee; /* Separator line for mobile */
    }
    .main-nav ul li:last-child a {
        border-bottom: none; /* Remove border from the last item */
    }
    
    body.menu-open { /* Prevent body scroll when menu is open */
        overflow: hidden;
    }
    
    .ad-container {
        flex-direction: column; /* Stack ad banners */
        align-items: center;
    }
    
    .ad-banner {
        width: 100%;
        max-width: 350px; /* Max width for stacked banners */
    }
}

@media (max-width: 576px) { /* Smaller mobile devices */
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2, /* For sections like Devotional Store */
    .column-text h2, /* For Overview section */
    .newsletter-info h2 {
        font-size: 1.8rem; /* Adjusted for smaller screens */
    }
    
    .newsletter-container {
        padding: 2rem 1.5rem; /* Reduce padding */
    }
    
    .devotional-store {
        grid-template-columns: 1fr; /* Single column for devotional items */
    }
}

@media (max-width: 375px) { /* Very narrow screens */
    .header-container {
        height: 60px; /* Even smaller header */
    }
    .hero {
        margin-top: 60px; /* Adjust margin for smaller header */
    }
    .main-nav {
        top: 60px; /* Adjust menu position for smaller header */
        height: calc(100vh - 60px);
    }

    .logo-title .title {
        font-size: 0.9rem; /* Smaller title font */
        /* display: none; */ /* Option: hide title completely */
    }
    .logo {
        width: 35px; /* Smaller logo */
        height: 35px;
    }
    header {
        padding-left: 0.75rem; /* Tighter padding */
        padding-right: 0.75rem;
    }
    .mobile-menu-toggle {
        padding: 0.75rem; /* Adjust toggle padding */
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
}
