/* ==========================================================================
   1. CORE RESET - FORCING DOCUMENT FLOW
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #f3f3f3;
    --text-main: #000000;
    --yellow-btn: #f4b41a;
    --red-btn: #ff4d2e;
    --teal-btn: #8edce6;
    --font-main: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: auto !important;
    min-height: 100%;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   2. THE HEADER (Universal Absolute Scroll for All Pages)
   ========================================================================== */
header.main-header, 
div[data-include*="header"],
div.main-header {
    display: flex !important;
    justify-content: space-between; 
    align-items: center;
    width: 100% !important;
    height: 120px !important;
    position: absolute !important; 
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    background-color: transparent !important;
    transform: none !important;
    transition: none !important;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    padding-left: 60px;
}

.header-logo-img {
    height: 80px; 
    width: auto;
}

#nav-menu {
    display: flex;
    align-items: center;
    padding-right: 60px;
}

#nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    padding: 0 20px;
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   3. UNIVERSAL PAGE CONTAINERS (Desktop Spacing - Reduced 40px)
   ========================================================================== */
.hero-container,
.blog-list-container,
.page-container {
    display: flex;
    flex-direction: column; /* Forces vertical stacking on desktop */
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    min-height: 100vh; 
    /* Reduced by 10px: Changed from 140px to 100px */
    padding: 200px 50px 40px !important; 
    position: relative;
    box-sizing: border-box;
}

/* Specific spacing for images at the top of pages */
.featured-image-wrapper,
.blog-hero-image {
    margin-top: 10px; /* Reduced margin */
    margin-bottom: 40px;
}

/* ==========================================================================
   4. BLOG LIST SPECIFICS (Vertical Align for Title & Load More)
   ========================================================================== */
.story-grid-section {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column; /* Ensures vertical alignment */
    align-items: center;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}

.load-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 50px; /* Separates the grid from the button vertically */
}

/* ==========================================================================
   5. HERO CONTENT (Home Page Specifics)
   ========================================================================== */
.hero-content {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
}

.profile-circle {
    width: 480px;
    height: 480px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.text-area h1 {
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
}

.button-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.circle-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    transition: transform 0.3s;
}

.circle-btn:hover { transform: scale(1.08); }
.yellow { background-color: var(--yellow-btn); }
.red { background-color: var(--red-btn); }
.teal { background-color: var(--teal-btn); }

/* ==========================================================================
   6. FOOTER (Desktop View)
   ========================================================================== */
.main-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 80px 60px;
    background-color: var(--bg-color);
    border-top: 1px solid #cfcaca; 
}

/* ==========================================================================
   7. MOBILE RESPONSIVE (S24 Ultra & iPhone Fixes)
   ========================================================================== */
@media screen and (max-width: 768px) {
    header.main-header, 
    div[data-include*="header"] {
        height: 80px !important;
        padding: 0 20px !important;
        position: absolute !important; 
    }

    .logo-wrapper { padding-left: 0 !important; }
    #nav-menu { padding-right: 0 !important; }
    .header-logo-img { height: 45px !important; }

    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        z-index: 10001;
    }

    .mobile-menu-btn .bar {
        width: 30px;
        height: 3px;
        background-color: #000;
    }

    #nav-menu {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        padding-right: 0 !important;
        transition: right 0.4s ease;
    }

    #nav-menu.nav-active { right: 0 !important; }
    #nav-menu a { font-size: 24px; padding: 15px 0; }

    .hero-container,
    .blog-list-container,
    .page-container {
        height: auto !important;
        min-height: 100dvh;
        flex-direction: column !important;
        /* Adjusted for mobile */
        padding: 100px 20px 60px !important; 
        justify-content: flex-start !important;
    }

    .hero-content {
        flex-direction: column !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .profile-circle {
        width: 280px !important;
        height: 280px !important;
    }

    .text-area h1 { font-size: 42px !important; }

    .button-group {
        flex-direction: row !important;
        justify-content: center !important;
    }

    .circle-btn {
        width: 90px !important;
        height: 90px !important;
        font-size: 11px !important;
    }

    .main-footer {
        flex-direction: column !important;
        padding: 40px 20px !important;
        text-align: left !important;
    }

    .copyright {
        text-align: left !important;
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 15px;
        margin-top: 10px;
    }
}

/* ==========================================================================
   8. ENTRANCE ANIMATION
   ========================================================================== */
.animated-entrance {
    animation: fadeInEntrance 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInEntrance {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}