/* /css/homepage_style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

/* Remove the :root block entirely */

body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    color: #212529;
    
    /* --- NEW BACKGROUND STYLES --- */
    background-color: #fdfaf3; /* A warm, paper-like fallback color */
    background-image: url('../webimages/skybg.jpg'); /* Relative path from /css/ to /webimages/ */
    background-repeat: repeat; /* Tile the image to create a seamless texture */
    background-attachment: fixed; /* Keep the background stationary when scrolling */
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Header --- */
.site-header {
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-header .logo img {
    height: 72px;
}
.main-nav {
    display: flex;
    gap: 0.5rem;
}
.btn {
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background-color: #28a745;
    color: white;
}
.btn-primary:hover {
    background-color: #218838;
}
.btn-secondary {
    background-color: transparent;
    color: #f97316;
    border: 1px solid #f97316;
}
.btn-secondary:hover {
    background-color: #ea580c;
    color: white;
}
/* --- START: NEW BRAND BLUE BUTTON STYLE --- */
.btn.btn-brandblue {
    background-color: #3b82f6; /* Your brand blue */
    color: #ffffff;
    border-color: #3b82f6; /* Make border the same color */
}

.btn.btn-brandblue:hover {
    background-color: #2563eb; /* A slightly darker shade for hover */
    border-color: #2563eb;
    color: #ffffff;
}
/* --- END: NEW BRAND BLUE BUTTON STYLE --- */

/* --- Add this to your Header section in homepage_style.css --- */

.main-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-light, #6c757d);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav .nav-link:hover {
    color: var(--text-dark, #212529);
}

/* --- V2: VIDEO HERO SECTION STYLES --- */

.hero {
    position: relative; /* This is the main anchor for all layers */
    height: 70vh; /* Give the hero a height relative to the viewport */
    min-height: 500px;
    display: flex; /* Use flexbox to easily center the content */
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden; /* Prevents any video overflow */
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits at the very back */
}

.hero-video-background video {
    width: 100%;
    height: 100%;
    /* This is the magic: it scales the video to fill the space, cropping if necessary, without distortion */
    object-fit: cover;
}

/* The dark overlay now sits on top of the video */
.hero-video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 2;
}

/* The text content sits on the highest layer */
.hero-content {
    position: relative; /* Ensures it sits on top of the overlay */
    z-index: 3;
}

/* Text styles remain largely the same, but we adjust the font size for the new layout */
.hero h1 {
    font-size: 3.5rem; /* Make it a bit bigger and bolder */
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.btn-large {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    font-weight: 600;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .hero {
        height: 80vh; /* Taller on mobile to show more video */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero .subtitle {
        font-size: 1.1rem;
    }
}

/* REFINED: Style for the Search Bar on the Homepage */
.homepage-search {
    padding: 3rem 0 2rem 0; /* 3rem above, 2rem below */
    
    /* --- NEW BACKGROUND STYLES --- */
    background-color: #fff;
    /* The path needs to go up two levels from /login/css/ */
    background-image: url('../../webimages/skybg.jpg'); 
    background-repeat: repeat;
    background-attachment: center;
    
}

/* You can reuse the search form styles from search.php */
/* If you want it slightly different on the homepage, you can scope it like this: */
.homepage-search .search-form {
    max-width: 700px; /* Maybe a little wider on the homepage */
}

/* --- Featured Gallery --- */
.featured-gallery {
    padding: 2rem 0 4rem 0; /* 2rem above, 4rem below */
}
.featured-gallery h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}
.flipbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.flipbook-card {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
        /* --- NEW BACKGROUND STYLES --- */
    background-color: #fff;
    /* The path needs to go up two levels from /login/css/ */
    background-image: url('../webimages/woodbg3.jpg'); 
    background-repeat: repeat;
    background-attachment: contain;
    
}
.thumbnail-link {
    display: block;
    position: relative;
}
/* --- REVISED: Styles for "Floating" Thumbnail Effect --- */

/* 1. The Thumbnail Container */
.thumbnail {
    position: relative;
    
    /* Keep the square aspect ratio */
    aspect-ratio: 1 / 1; 

    /* Use flexbox to center the image inside */
    display: flex;
    justify-content: center;
    align-items: flex-start;

    /* Add padding to create a "frame" around the image */
    padding: 1rem; /* A little less padding than the admin cards */
    box-sizing: border-box;
    
    /* Remove overflow hidden to let the shadow be visible */
    overflow: visible;
    
    /* --- NEW BACKGROUND STYLES --- */
    background-color: var(--bg-light, #f8f9fa); /* Use the light background color variable */
    /* The path needs to go up two levels from /login/css/ */
    background-image: url('../webimages/woodbg2.jpg'); 
    background-repeat: repeat;
    background-attachment: contain;
    
}

/* 2. The Thumbnail Image */
.thumbnail img {
    /* Let the image size itself, but not exceed the container */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    
    object-fit: contain;
    display: block;
    border-radius: 4px; /* Slightly rounded corners for the image */

    /* A subtle border to represent the cover's edge */
    border: 1px solid rgba(0, 0, 0, 0.2);

    /* --- THE SIDE-ON THICKNESS EFFECT --- */
    box-shadow: 
        /* The right and bottom page edges */
        4px 4px 0px rgba(0, 0, 0, 0.15),
        /* A soft drop shadow behind everything */
        6px 6px 12px rgba(0, 0, 0, 0.2);
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 3. The Hover Effect (with enhanced thickness) */
.flipbook-card:hover .thumbnail img {
    transform: scale(1.05) translateY(-5px) rotate(1deg);
    
    box-shadow:
        /* Make the edges slightly larger on hover */
        6px 6px 0px rgba(0, 0, 0, 0.15),
        /* And the main drop shadow softer and larger */
        8px 8px 16px rgba(0, 0, 0, 0.25);
}
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}
.overlay-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid white;
}
.card-content {
    padding: 1rem;
}
.card-content .title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-content .title a {
    color: inherit;
    text-decoration: none;
}
.card-content .title a:hover {
    color: #28a745;
}
.no-results {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

/* --- NEW: Styles for Search Page --- */

.search-hero {
    text-align: center;
    padding: 3rem 0;

    /* --- NEW BACKGROUND STYLES --- */
    background-color: #f8f9fa;
    /* The path needs to go up two levels from /login/css/ */
    background-image: url('../../webimages/paperbg.jpg'); 
    background-repeat: repeat;
    background-attachment: fixed;
    
}

.search-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    /* The gap will now be created with margins */
}

.search-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* <-- MOVED HERE */
    margin-right: 8px; /* <-- THE NEW GAP */
    transition: box-shadow 0.2s, border-color 0.2s; /* Added transition */
}
.search-input:focus {
    border-color: #28a745;
}

.search-form .btn {
    border-radius: 5px;
    /* border property can be removed if not needed for alignment */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* <-- ADDED HERE */
    transition: all 0.2s; /* Ensure hover transitions are smooth */
}

.search-results-gallery {
    padding: 3rem 0;
}

.search-results-gallery h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #6c757d !important;
}

/* REFINED & STRONGER: Style for the search results header */
.search-results-gallery h2.search-results-heading {
    text-align: center;
    font-size: 1.2rem !important; /* THE FIX: Added !important */
    font-weight: 300 !important;   /* Added !important for consistency */
    color: #6c757d !important;
    margin-top: 0 !important;
    margin-bottom: 1.8rem !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 1.5rem !important;
}

.search-results-heading strong {
    font-weight: 600; /* Bolder weight for the search query */
    color: #212529;
}

/* =================================
   Free Tools Section Styles
==================================== */

.free-tools-section {
    padding: 60px 0; /* Adds vertical space above and below the section */
    text-align: center;
    
    /* --- NEW BACKGROUND STYLES --- */
    background-color: #f8f9fa;
    /* The path needs to go up two levels from /login/css/ */
    background-image: url('../../webimages/skybg.jpg'); 
    background-repeat: repeat;
    background-attachment: center;
    
}

.free-tools-section .section-title {
    margin-bottom: 40px; /* Space between the title and the cards */
    font-size: 2.5em; /* Make the title prominent */
    color: #343a40;
    font-weight: 600;
}

/* This creates the two-column layout */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 30px; /* The space between the two cards */
    max-width: 800px; /* Limit the width of the grid */
    margin: 0 auto; /* Center the grid within the section */
}

/* The style for each clickable tool card */
.tool-card {
    display: block; /* Makes the whole area of the <a> tag a block */
    background-color: #fffef8;
    padding: 40px 20px;
    border-radius: 45px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none; /* Removes the default blue underline from the link */
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for the hover effect */
}

.tool-card:hover {
    transform: translateY(-8px); /* Lifts the card up slightly on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Adds a more pronounced shadow on hover */
}

.tool-card img {
    height: 180px; /* Control the size of your icons */
    margin-bottom: 20px;
}

.tool-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #343a40;
}

.tool-card p {
    font-size: 0.75em;
    color: #6c757d; /* Lighter color for the description text */
    line-height: 1.5;
}

/* --- STYLES FOR EMMA VIDEO AVATAR --- */
.emma-video-container {
    margin: 0 auto 1.5rem auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background-color: #e5e7eb;
}
.emma-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- NEW: Styles for Pricing Page --- */

.pricing-hero {
    text-align: center;
    padding: 3rem 0;
    background-color: var(--bg-light, #f8f9fa);
    border-bottom: 1px solid #dee2e6;
}
.pricing-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pricing-table-section {
    padding: 4rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Make cards the same height */
}

.pricing-card {
    display: flex;
    flex-direction: column; /* Allows footer to stick to the bottom */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.pricing-card.recommended {
    border-color: var(--primary-color, #28a745);
    border-width: 2px;
}

.recommended-badge {
    position: absolute;

    /* --- THE FIX IS HERE --- */
    top: 22px;   /* Push it down slightly */
    right: -30px; /* Pull it in from the right */
    
    background-color: var(--primary-color, #28a745);
    color: white;
    
    /* Give it a bit more width and padding */
    width: 140px;
    padding: 8px 0;
    text-align: center; /* Ensure text is centered */

    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Add a subtle shadow for depth */
}

.pricing-card .card-header {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}
.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}
.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark, #212529);
    margin: 0.5rem 0;
}
.price-tag span:first-child {
    font-size: 1.5rem;
    vertical-align: top;
    color: var(--text-light, #6c757d);
}
.price-tag span:last-child {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light, #6c757d);
}
.card-description {
    color: var(--text-light, #6c757d);
    min-height: 40px; /* Ensures consistent height */
}

.pricing-card .card-body {
    padding: 2rem;
}
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}
.features-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.features-list li::before {
    font-weight: 900; /* For Font Awesome or similar */
    flex-shrink: 0;
    margin-top: 2px;
}
.features-list li.feature-included::before {
    content: '✓';
    color: var(--primary-color, #28a745);
}
.features-list li.feature-excluded::before {
    content: '✕';
    color: #dc3545;
}
.features-list li.feature-excluded {
    color: var(--text-light, #6c757d);
    text-decoration: line-through;
}

.pricing-card .card-footer {
    padding: 2rem;
    margin-top: auto; /* Pushes the footer to the bottom */
}
.card-footer .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
}

/* --- NEW: THEMED STYLES FOR PRICING CARDS --- */

/* --- TIER 1: FREE (Green Theme) --- */
.pricing-card.tier-free {
    border-color: #d1fae5;
}
.pricing-card.tier-free .card-header {
    background-color: #f0fdf4;
}
.pricing-card.tier-free .price-tag {
    color: #065f46;
}
.pricing-card.tier-free .btn-secondary {
    border-color: #10b981;
    color: #10b981;
}
.pricing-card.tier-free .btn-secondary:hover {
    background-color: #10b981;
    color: white;
}

/* --- TIER 2: PRO (Orange Theme) --- */
.pricing-card.tier-pro {
    border-color: #f97316; /* Vibrant orange border for recommended */
}
.pricing-card.tier-pro .recommended-badge {
    background-color: #f97316;
}
.pricing-card.tier-pro .card-header {
    background-color: #fff7ed;
}
.pricing-card.tier-pro .price-tag {
    color: #9a3412;
}
.pricing-card.tier-pro .btn-primary {
    background-color: #f97316;
}
.pricing-card.tier-pro .btn-primary:hover {
    background-color: #ea580c;
}
.pricing-card.tier-pro .feature-included::before {
    color: #f97316; /* Make checkmarks orange */
}

/* --- TIER 3: BUSINESS (Black/Gray Theme) --- */
.pricing-card.tier-business {
    border-color: #d1d5db;
}
.pricing-card.tier-business .recommended-badge {
    background-color: #4b5563; /* The same dark gray as the button */
}
.pricing-card.tier-business .card-header {
    background-color: #f3f4f6; /* A light gray */
}
.pricing-card.tier-business .price-tag {
    color: #1f2937; /* A deep, dark gray */
}
.pricing-card.tier-business .btn-secondary {
    border-color: #4b5563;
    color: #4b5563;
}
.pricing-card.tier-business .btn-secondary:hover {
    background-color: #4b5563;
    color: white;
}
.pricing-card.tier-business .feature-included::before {
    color: #4b5563; /* Make checkmarks gray */
}

/* --- METALLIC PRICING THEMES --- */

/* 1. Copper (Starter) */
.pricing-card.tier-copper {
    border-color: #d97706; /* Dark Copper/Bronze */
}
.pricing-card.tier-copper .card-header {
    background: linear-gradient(to bottom right, #fff7ed, #ffedd5); /* Subtle warm gradient */
    color: #92400e;
}
.pricing-card.tier-copper h3 {
    color: #92400e; /* Dark Bronze text */
}
.pricing-card.tier-copper .btn-primary {
    background-color: #d97706;
    border-color: #d97706;
    color: white;
}
.pricing-card.tier-copper .btn-primary:hover {
    background-color: #b45309;
}
.pricing-card.tier-copper .price-tag {
    color: #92400e;
}

/* 2. Silver (Creator) */
.pricing-card.tier-silver {
    border-color: #9ca3af; /* Silver/Gray */
}
.pricing-card.tier-silver .card-header {
    background: linear-gradient(to bottom right, #f9fafb, #e5e7eb); /* Metallic gradient */
    color: #374151;
}
.pricing-card.tier-silver h3 {
    color: #374151;
}
.pricing-card.tier-silver .btn-secondary {
    background-color: #6b7280;
    border-color: #6b7280;
    color: white;
}
.pricing-card.tier-silver .btn-secondary:hover {
    background-color: #4b5563;
}
.pricing-card.tier-silver .price-tag {
    color: #1f2937;
}
.pricing-card.tier-silver .recommended-badge {
    background-color: #6b7280; /* Silver badge */
}

/* 3. Gold (Agency) */
.pricing-card.tier-gold {
    border-color: #eab308; /* Gold */
}
.pricing-card.tier-gold .card-header {
    background: linear-gradient(to bottom right, #fefce8, #fef9c3); /* Pale Gold */
    color: #854d0e;
}
.pricing-card.tier-gold h3 {
    color: #854d0e;
}
.pricing-card.tier-gold .btn-secondary {
    background-color: #ca8a04;
    border-color: #ca8a04;
    color: white;
}
.pricing-card.tier-gold .btn-secondary:hover {
    background-color: #a16207;
}
.pricing-card.tier-gold .price-tag {
    color: #854d0e;
}

/* Strike-through style for credits */
.standard-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
    font-weight: normal;
}
.discount-price {
    font-size: 1.5rem;
    font-weight: bold;
}

/* --- Billing Toggle Styles --- */
.billing-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2.1rem;
    margin-bottom: 2.1rem;
    font-weight: 500;
    color: #475569;
}
.discount-badge {
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 99px;
    margin-left: 5px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { display: none; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2563eb;
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* --- NEW: Styles for Logged-In User in Public Header --- */

.user-menu-public {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-block-public {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
}

.welcome-block-public .profilename {
    font-weight: 600;
    color: var(--text-dark, #212529);
}

/* --- Styles for Subscription Status Badges (Copied from admin_style) --- */
/* It's good to have these in both stylesheets for consistency */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: capitalize;
}
.status-badge.header-badge { /* Smaller version for headers */
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}
.status-badge.free-status {
    background-color: #d1fae5;
    color: #065f46;
}
.status-badge.pro-status {
    background-color: #fff7ed;
    color: #9a3412;
}
.status-badge.business-status {
    background-color: #e5e7eb;
    color: #1f2937;
}

.status-badge.nz360-status {
    background-color: #dbeafe; /* Pale Blue */
    color: #1e40af; /* Deep Blue Text */
    border: 1px solid #bfdbfe;
}

/* --- Responsive Design for Mobile --- */
/* This will stack the cards vertically on smaller screens */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr; /* One column on mobile */
    }
    .free-tools-section .section-title {
        font-size: 2em; /* Slightly smaller title on mobile */
    }
    .thumbnail {
        /* On mobile, align the image to the top to prevent cropping the title */
        align-items: flex-start;
        
        /* Optional: Reduce padding on mobile to give the image more space */
        padding: 0.9rem 3rem;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero .subtitle { font-size: 1.1rem; }
    .featured-gallery h2 { font-size: 2rem; }

    .site-header .container { flex-direction: column; gap: 1rem; }
    .main-nav { justify-content: center; width: 100%; }
}

/* --- Site Footer Styles --- */
.site-footer {
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 3rem; 
    background-color: #368ec8;
}

.site-footer .footer-content {
    max-width: 1400px; /* Constrain width like .container */
    margin: 0 auto; /* Center the content */
    padding: 0 2rem; /* Add horizontal padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Increased gap for better spacing between sections */
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap; /* Allow links to wrap */
    justify-content: center;
    gap: 10px; /* Space between policy links */
}
.site-footer .footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.site-footer .footer-links a:hover {
    color: #ff9c3f; 
}

/* NEW: Footer Social Links Container */
.footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Space between social icons */
    margin-top: 10px; /* Space above social links */
    margin-bottom: 10px; /* Space below social links (before copyright) */
}

/* NEW: Individual Social Icon Link */
.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; /* Size of the icon area */
    height: 36px;
    border-radius: 50%; /* Circular background */
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background for icons */
    transition: background-color 0.2s, transform 0.2s;
    color: #fff; /* Default icon color */
}

.social-icon-link:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Brighter background on hover */
    transform: scale(1.1); /* MODIFIED: Make the icon slightly larger on hover */
    color: #fff; /* Ensure SVGs stay white on hover */
}

/* --- UNIFIED ICON STYLING FOR FOOTER --- */

/* This targets BOTH the SVG and the IMG tags inside the links */
.social-icon {
    width: 24px;  /* Set the desired icon size */
    height: 24px;
}

/* Specific rule for SVGs */
.social-icon:not(.social-icon-img) { /* This targets the SVG but not the IMG */
    fill: currentColor;
}

/* Specific rule for IMGs */
.social-icon-img {
    object-fit: contain; /* Ensures the image scales without distortion */
}

/* --- NEW: Style for the separate LINE button row --- */
.footer-line-button {
    /* Center the button */
    text-align: center;
    /* Add some space above it, separating it from the other icons */
    margin-top: 1rem;
}

/* Responsive adjustment for footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 1rem 0;
    }
    .site-footer .footer-content {
        padding: 0 1rem; /* Adjust horizontal padding on mobile */
    }
    .site-footer .footer-links {
        flex-direction: column; /* Stack policy links vertically on small screens */
        gap: 5px;
    }
    .site-footer .footer-links a {
        margin: 0;
    }
    .footer-social-links {
        gap: 15px; /* Reduce gap between social icons on mobile */
    }
    .social-icon-link {
        width: 32px; /* Smaller icons on mobile */
        height: 32px;
    }
    .social-icon {
        width: 20px; /* Smaller SVG icons on mobile */
        height: 20px;
    }
    .social-icon-img {
        object-fit: contain; /* Re-assert for safety */
    }
}

/* --- NEW: Styles for Pagination --- */

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination-nav a,
.pagination-nav span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: var(--primary-color, #28a745); /* Use your public theme color */
}

.pagination-nav a:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.pagination-nav .current-page {
    background-color: var(--primary-color, #28a745);
    color: white;
    border-color: var(--primary-color, #28a745);
    cursor: default;
}

.pagination-nav .disabled {
    color: #6c757d;
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .pagination-nav a,
    .pagination-nav span {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* --- NEW: Styles for Call-to-Action Section --- */
.cta-section {
    background-color: var(--text-dark, #368ec8);
    color: white;
    text-align: center;
    padding: 4rem 0;
    margin-top: 2rem;
}
.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.cta-section p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* ============================================= */
/* --- STYLES FOR HERO VIDEO BUTTON & LIGHTBOX --- */
/* ============================================= */

/* 1. Wrapper for the hero buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
    justify-content: center;
    align-items: center;
    gap: 1.5rem; /* Space between buttons */
    margin-top: 2rem;
}

/* 2. Style for the new "Watch Video" button (using its ID for specificity) */
#watch-video-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
/* We also need to add the hover effect to the ID selector */
#watch-video-btn:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Subtle hover effect */
}
/* And the SVG icon style */
#watch-video-btn svg {
    width: 1.5em;
    height: 1.5em;
}

/* 3. Styles for the Video Lightbox (inspired by viewer.php) */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.video-lightbox .video-container {
    width: 100%;
    max-width: 1100px;
    position: relative;
    /* Maintain 16:9 aspect ratio */
    aspect-ratio: 16 / 9;
}

.video-lightbox video {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.video-lightbox .lightbox-close-btn {
    position: fixed; /* Position relative to the screen for consistency */
    top: 15px;
    right: 25px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 5px black;
    z-index: 1001;
    transition: transform 0.2s ease;
}

.video-lightbox .lightbox-close-btn:hover {
    transform: scale(1.1);
}

/* ============================================= */
/* --- V4: PROFESSIONAL & ANIMATED STATS SECTION --- */
/* ============================================= */

.live-stats-section {
    padding: 3rem 0;
    background-color: #ffffff; /* Change to white for a cleaner card look */
    border-bottom: 1px solid #dee2e6;
    overflow-x: hidden; /* Prevent horizontal scrollbars from animation */
}

.stats-grid {
    display: grid;
    /* On mobile, start with 2 columns and let the last item center itself */
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Find the last item when there's an odd number (5) and make it span both columns */
.stats-grid .stat-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.stat-item {
    background-color: #f8f9fa; /* Light gray card background */
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    
    /* Animation setup */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Add a hover effect to the cards */
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

/* Stagger the animation for each card */
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-icon {
    margin: 0 auto 1rem auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

/* Thematic Color Accents */
.stat-item.public .stat-icon { background-color: #d1fae5; color: #065f46; } /* Now Green */
.stat-item.listed .stat-icon { background-color: #dbeafe; color: #1e40af; } /* Now Blue */
.stat-item.password .stat-icon { background-color: #fee2e2; color: #991b1b; } /* Red */
.stat-item.private .stat-icon { background-color: #e5e7eb; color: #1f2937; } /* Gray */
.stat-item.business .stat-icon { background-color: #e5e7eb; color: #1f2937; } /* Gray */

.stat-number {
    display: block;
    font-size: 1.2rem !important;
    font-weight: 600;
    color: #212529;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-transform: none;
}

/* The animation keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for desktop */
@media (min-width: 768px) {
    .stats-grid {
        /* On larger screens (tablets and up), switch to 5 columns */
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* We no longer need the special rule for the last item on desktop */
    .stats-grid .stat-item:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .stat-number {
        font-size: 2.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* ======================================= */
/* -- STYLES FOR PRICING SUMMARY TABLE -->
/* ======================================= */
.summary-table-section {
    padding: 4rem 0;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
}
.summary-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.summary-card {
    background: #fff;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
.summary-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}
.summary-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #1f2937;
}
.summary-desc {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}
.summary-ideal {
    font-size: 0.85rem;
    background-color: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    color: #374151;
    font-weight: 600;
}
/* Highlight styles */
.summary-card.highlight {
    border: 2px solid #3b82f6;
    background-color: #eff6ff;
}

/* ============================================= */
/* --- STYLES FOR FEATURE COMPARISON TABLE     --- */
/* ============================================= */

.feature-comparison-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.feature-comparison-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.feature-table {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden; /* This is key for the rounded corners */
}

.feature-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.75fr; /* <-- 5 columns : Feature Name, Free, Pro, Business, Tutorial */
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}
.feature-row:last-child {
    border-bottom: none;
}

/* Style for the main header row */
.feature-row.header {
    background-color: #f8f9fa;
    font-weight: 600;
}
.feature-row.header .feature-tier {
    font-size: 1.2rem;
}

/* Style for section headers (e.g., "Core Features") */
.feature-row.section-header {
    grid-column: 1 / -1; /* Make this cell span all columns */
    background-color: #e9ecef;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
}

/* General cell styling */
.feature-name, .feature-tier {
    padding: 1rem 1.5rem;
}
.feature-name {
    text-align: left;
    font-weight: 500;
}
.feature-tier {
    text-align: center;
    font-size: 1.1rem;
}
/* --- NEW: Style for the Tutorial Link Column --- */
.feature-tutorial-link {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-tutorial-link img {
    width: 28px; /* A slightly larger, clearer icon */
    height: 28px;
    opacity: 0.6;
    transition: all 0.2s ease-in-out;
}

.feature-tutorial-link:hover img {
    opacity: 1;
    transform: scale(1.1);
}
/* --- START: NEW THEMATIC COLUMN COLORS --- */

/* This targets the 2nd child (Free column) in every row */
.feature-row .feature-tier:nth-child(2) {
    background-color: #f0fdf4; /* Pale Green */
}

/* This targets the 3rd child (Pro column) */
.feature-row .feature-tier:nth-child(3) {
    background-color: #fff7ed; /* Pale Orange */
}

/* This targets the 4th child (Business column) */
.feature-row .feature-tier:nth-child(4) {
    background-color: #f1f5f9; /* Light Gray (Slate) */
}

/* 1. Remove the general background from the header row itself */
.feature-row.header {
    background-color: transparent;
    font-size: 1.2rem;
    font-weight: 700;
}

/* 2. Apply the dark thematic colors to each individual header cell */
.feature-row.header .feature-name {
    background-color: #999; /* Keep the first cell neutral */
    color: white;
    font-weight: 700;
}
.feature-row.header .feature-tier:nth-child(2) {
    background-color: #16a34a; /* Dark Green */
    color: white;
}
.feature-row.header .feature-tier:nth-child(3) {
    background-color: #f97316; /* Vibrant Orange */
    color: white;
}
.feature-row.header .feature-tier:nth-child(4) {
    background-color: #4b5563; /* Dark Gray */
    color: white;
}
.type-icon.business { background-color: #e5e7eb; color: #1f2937; }
.type-icon.liked { background-color: #fce7f3; color: #9d174d; }

/* --- END: NEW THEMATIC COLUMN COLORS --- */

/* Checkmark and Exmark styling */
/* 1. Base style for ALL checkmarks (without a specific color) */
.feature-tier.checkmark {
    font-weight: 700;
    font-size: 1.5rem;
    /* The single color rule is removed from here */
}

/* 2. Thematic colors for checkmarks in each column */
/* Free Tier (2nd column) */
.feature-row .feature-tier:nth-child(2).checkmark {
    color: #198754; /* Green */
}

/* Pro Tier (3rd column) */
.feature-row .feature-tier:nth-child(3).checkmark {
    color: #f97316; /* Vibrant Orange */
}

/* Business Tier (4th column) */
.feature-row .feature-tier:nth-child(4).checkmark {
    color: #4b5563; /* Dark Gray */
}

.feature-tier.exmark {
    color: #ced4da; /* Light Gray */
    font-weight: 400;
    font-size: 1.2rem;
}


/* --- RESPONSIVE STYLES FOR MOBILE --- */
@media (max-width: 768px) {
    .feature-comparison-section .section-title {
        font-size: 2rem;
    }

    /* This is the key for mobile: hide the main table header */
    .feature-row.header {
        display: none;
    }

    /* Convert the grid into a list-like view */
    .feature-row {
        grid-template-columns: 1fr; /* A single column */
        padding: 0;
    }
    
    .feature-name {
        background-color: #f8f9fa;
        font-weight: 700;
        padding: 0.75rem 1rem;
    }

    .feature-tier {
        display: flex;
        justify-content: space-between; /* Put label on left, value on right */
        padding: 0.75rem 1rem;
        text-align: right;
        border-bottom: 1px solid #f1f3f5; /* Lighter border between tiers on mobile */
    }
    .feature-tier:last-child {
        border-bottom: none;
    }

    /* Use the data-label attribute to create the label on mobile */
    .feature-tier::before {
        content: attr(data-label);
        font-weight: 500;
        text-align: left;
        color: #495057;
    }
}

/* ============================================= */
/* --- STYLES FOR PWA INSTALL PAGE           --- */
/* ============================================= */

.pwa-install-hero {
    padding: 3rem 0;
    text-align: center;
    background-color: #f8f9fa; /* Match stats section */
}

.pwa-app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.pwa-install-hero h1 {
    font-size: 2.5rem;
}

.pwa-instructions-section {
    padding: 3rem 0;
}

.install-wrapper, .instructions-wrapper {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

.install-wrapper .btn-large {
    width: auto;
    padding: 1rem 2.5rem;
}
.install-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.instructions-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* ============================================= */
/* --- V2: SIMPLIFIED PWA INSTRUCTION LIST --- */
/* ============================================= */

.steps-list {
    /* Use standard list styling for natural text flow */
    list-style: none; /* We will create our own custom numbers */
    padding-left: 0;
    margin-left: 1.5rem; /* Indent the whole list slightly */
    text-align: left;
    
    /* This creates the counter for our custom numbers */
    counter-reset: step-counter;
}

.steps-list li {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6; /* Add more space between lines for readability */
    margin-bottom: 1.2rem;
    position: relative; /* Needed for the custom number positioning */
    padding-left: 2.5rem; /* Create space for the custom number */
}

.steps-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    
    /* Style the number circle */
    position: absolute;
    left: 0;
    top: 0;
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    
    /* Use flexbox to center the number inside the circle */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* This is the same as before, just good to keep it */
.inline-icon {
    height: 24px;
    vertical-align: middle;
    margin: 0 4px; /* Add a little horizontal space around the icon */
}

/* ======================================== */
/* --- V2: PWA PROMO SECTION WITH VIDEO --- */
/* ======================================== */

.pwa-promo-section {
    background-color: #f0f4f8; /* A light background to stand out */
    padding: 4rem 0;
    text-align: left; /* Change from center to left */
}

.pwa-promo-content {
    display: flex; /* THIS IS THE KEY */
    align-items: center; /* Vertically align items */
    gap: 3rem; /* Space between text, icon, and video */
    flex-wrap: wrap; /* Allow items to stack on mobile */
    justify-content: center; /* Center the items when they wrap */
}

.pwa-promo-icon {
    flex-shrink: 0; /* Prevent the icon from shrinking */
}
.pwa-promo-icon img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.pwa-promo-text {
    flex-grow: 1; /* Allow the text block to take available space */
    max-width: 550px;
}

.pwa-promo-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.pwa-promo-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1.5rem;
}

/* NEW: Style for the Emma video in this specific section */
.emma-video-container.pwa-promo-video {
    flex-shrink: 0; /* Prevent video from shrinking */
    margin: 0; /* Reset the auto margins from the global style */
    width: 150px; /* A slightly larger video for this layout */
    height: 150px;
}

/* Responsive adjustments for mobile */
@media (max-width: 992px) {
    .pwa-promo-content {
        text-align: center; /* Center text when items stack */
    }
    .pwa-promo-text {
        /* Order the text to appear after the icon and video on mobile */
        order: 3;
    }
}

/* ======================================================= */
/* --- V3: RESPONSIVE FLIPBOOK TYPES SECTION --- */
/* ======================================================= */

.flipbook-types-section {
    padding: 4rem 1rem; /* Add horizontal padding for mobile */
    background-color: #ffffff;
}

.flipbook-types-section .section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.flipbook-types-section .section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.types-visual-full {
    text-align: center;
    margin-bottom: 3rem;
}
.types-visual-full img {
    max-width: 100%;
    width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* --- THE RESPONSIVE FIX STARTS HERE --- */

/* Mobile First: Start with a single column layout */
.types-list-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column */
    gap: 1.5rem;
    max-width: 900px; /* Set a max-width for the grid itself */
    margin: 0 auto; /* Center the grid */
}

/* Tablet View: Switch to 2 columns */
@media (min-width: 600px) {
    .types-list-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns */
    }
}

/* Desktop View: Switch to 3 columns for the 2x3 layout */
@media (min-width: 992px) {
    .types-list-grid {
        grid-template-columns: 1fr 1fr 1fr; /* 3 columns */
    }
}

/* --- (The rest of your styles for .type-item are perfect and don't need to change) --- */

.type-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    text-align: left; /* Ensure text is left-aligned */
}
.type-item:hover {
    transform: translateY(-5px);
    border-color: #ced4da;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.type-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.type-icon svg {
    width: 24px;
    height: 24px;
}

/* Thematic colors are still correct */
.type-icon.public { background-color: #d1fae5; color: #065f46; }
.type-icon.listed { background-color: #dbeafe; color: #1e40af; }
.type-icon.password { background-color: #fee2e2; color: #991b1b; }
.type-icon.private { background-color: #e5e7eb; color: #1f2937; }
.type-icon.business { background-color: #e5e7eb; color: #1f2937; }
.type-icon.liked { background-color: #fce7f3; color: #9d174d; }

.type-text h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.type-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
}

/* Also adjust the main title on mobile */
@media (max-width: 768px) {
    .flipbook-types-section .section-title {
        font-size: 1.8rem;
    }
}

/* --- STYLES FOR BLOG PROMO ON HOMEPAGE --- */
.blog-promo-section {
    padding: 4rem 0;
    text-align: center;
}

/* Re-use the existing post-list and post-card styles from blog_style.css */
/* No need to duplicate them here if blog_style.css is also loaded or @imported. */
/* However, for robustness, we can add them here. */

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}
.post-card {
    display: block;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.post-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}
.post-card-content {
    padding: 1.5rem;
}
.post-card-content h3 { /* Using h3 for homepage section */
    font-size: 1.25rem;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}
.post-card-content p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    /* Limit description to 3 lines with an ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
.read-more-link {
    font-weight: 600;
    color: #2563eb;
}
.section-cta {
    margin-top: 3rem;
}

/* --- NEW: Style for "Back to Blog" link in post.php --- */
.back-to-blog-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
}
.back-to-blog-link:hover {
    color: #1f2937;
    text-decoration: underline;
}

/* =================================================================== */
/* --- V2: RESPONSIVE HEADER FOR MOBILE --- */
/* =================================================================== */

@media (max-width: 768px) {
    /* On screens 768px or less... */

    .site-header .container {
        /* Allow items to wrap if they still don't fit */
        flex-wrap: wrap;
        justify-content: center; /* Center the logo and nav when they stack */
        gap: 1rem; /* Add space between the logo and the nav when stacked */
    }
    
    .main-nav {
        /* Reduce the space between the nav items themselves */
        gap: 0.5rem; 
    }

    .main-nav .nav-link {
        /* Make the text links slightly smaller */
        font-size: 0.9rem;
        padding: 5px 8px; /* Reduce padding */
    }
    
    .main-nav .btn {
        /* Make the Login/Sign Up buttons smaller */
        font-size: 0.9rem;
        padding: 0.5rem 1rem; /* Reduce padding */
    }
}

@media (max-width: 480px) {
    /* On very small screens, like an iPhone SE... */
    
    .main-nav {
        /* Further reduce the gap */
        gap: 0.3rem;
    }

    .main-nav .nav-link,
    .main-nav .btn {
        /* Make everything even smaller */
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* --- Google Preferred Source Tip (Homepage) --- */
.google-pref-tip {
    margin: 1.5rem auto 0 auto;
    max-width: 600px;
    background-color: #f0f9ff; /* Very light blue */
    border: 1px solid #bae6fd; /* Soft blue border */
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center; /* Center icon with text vertically */
    gap: 12px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.google-pref-tip .tip-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0; /* Prevents icon from squishing on mobile */
}

.google-pref-tip .tip-text {
    font-size: 0.9rem;
    color: #0369a1; /* Dark blue for readability */
    line-height: 1.4;
}

.google-pref-tip .tip-text strong {
    color: #075985;
}

.google-pref-tip .tip-text a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
    white-space: nowrap; /* Keeps the link text together */
}

.google-pref-tip .tip-text a:hover {
    color: #0369a1;
}

/* Responsive adjustment for mobile */
@media (max-width: 600px) {
    .google-pref-tip {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .google-pref-tip .tip-text a {
        display: block;
        margin-top: 5px;
        white-space: normal;
    }
}

