@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Slabo+27px&display=swap');

/* ==========================================
    1. VARIABLES & RESET
    ========================================== */
:root {
    --primary: #DF4205;
    /* Anaranjado */
    --secondary: #037BAA;
    /* Azul */
    --tertiary: #837877;
    /* Gris cálido */
    --text-dark: #1f2937;
    --text-light: #f9fafb;
    --bg-color: #ffffff;
    --section-bg: #f8f9fa;
}

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

body {
    font-family: 'PT Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================
    2. HEADER
    ========================================== */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 1.5rem 2rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-buttons {
    display: flex;
    background-color: #0d0d0d;
}

.btn-divider {
    width: 1px;
    background-color: #333;
}

.btn-header {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    transition: background-color 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.8rem;
}

.btn-header:hover {
    background-color: #1a1a1a;
}

.btn-header svg {
    width: 22px;
    height: 22px;
}

/* ==========================================
    3. SECTION 1: HERO
    ========================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    /* Dark overlay to make text readable */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

/* Gradient blending into solid color at the bottom */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    /* Right side text */
    width: 100%;
}

.hero-text-box {
    max-width: 600px;
    text-align: right;
    color: white;
    padding-bottom: 5rem;
    /* Space for gradient */
}

.hero-slogan {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-slogan span {
    color: var(--primary);
}

/* ==========================================
    4. SECTION 2: CARRERAS
    ========================================== */
.carreras {
    padding: 5rem 0;
    background-color: var(--bg-color);
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
}

.carreras-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.carrera-card {
    background: var(--section-bg);
    padding: 2rem;
    border-radius: 12px;
    border-left: 6px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.carrera-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-left-color: var(--secondary);
}

.carrera-icon {
    font-size: 2.5rem;
    color: var(--tertiary);
    transition: color 0.3s;
}

.carrera-card:hover .carrera-icon {
    color: var(--primary);
}

.carrera-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.carrera-info p {
    color: var(--tertiary);
    font-size: 0.95rem;
}

.conoce-mas-card {
    background: linear-gradient(135deg, var(--primary) 0%, #b63c09 100%);
    color: white;
    border-left: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

.conoce-mas-card:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 30px rgba(223, 66, 5, 0.3);
}

.conoce-mas-card .carrera-info p {
    color: rgba(255, 255, 255, 0.9);
}

.conoce-mas-card i {
    font-size: 2rem;
    margin-top: 0;
    transition: transform 0.3s;
}

.conoce-mas-card:hover i {
    transform: translateX(10px);
}

/* ==========================================
    5. SECTION 3: CALL TO ACTION
    ========================================== */
.cta-section {
    position: relative;
    padding: 8rem 0;
    background-image: url('https://images.unsplash.com/photo-1543269865-cbf427effbad?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    border-radius: 30px;
    margin: 0 2rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 123, 170, 0.9) 0%, rgba(4, 5, 223, 0.4) 100%);
}

.cta-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

.cta-text {
    max-width: 50%;
    color: white;
}

.cta-text h2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cta-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.cta-buttons {
    align-self: flex-end;
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    /* Push to bottom */
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(223, 66, 5, 0.3);
}

.btn-primary:hover {
    background-color: #c43904;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(223, 66, 5, 0.4);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 10px 20px rgba(3, 123, 170, 0.3);
}

.btn-secondary:hover {
    background-color: #025a7d;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(3, 123, 170, 0.4);
}

.btn-white {
    background-color: white;
    color: var(--text-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background-color: var(--section-bg);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================
    6. SECTION 4: PUBLICACIONES
    ========================================== */
.publicaciones {
    padding: 8rem 0;
    background-color: var(--bg-color);
}

.pub-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.pub-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.pub-card:hover {
    transform: translateY(-10px);
}

.pub-img-container {
    width: 100%;
    aspect-ratio: 4/5;
    /* Taller image */
    overflow: hidden;
    background-color: var(--tertiary);
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.pub-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pub-card:hover .pub-img-container img {
    transform: scale(1.05);
}

/* Specific Image Shapes */
/* Top Oval, Bottom slight round */
.shape-top-oval {
    border-radius: 50% 50% 12px 12px / 15% 15% 12px 12px;
}

/* Bottom Oval, Top slight round */
.shape-bottom-oval {
    border-radius: 12px 12px 50% 50% / 12px 12px 15% 15%;
}

.pub-content h4 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    line-height: 1.3;
}

.pub-content p {
    font-size: 0.95rem;
    color: var(--tertiary);
}

.ver-mas-container {
    display: flex;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(223, 66, 5, 0.2);
}

/* ==========================================
    7. RESPONSIVE DESIGN
    ========================================== */
@media (max-width: 1024px) {
    .pub-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-section {
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slogan {
        font-size: 3rem;
    }

    .carreras-grid {
        grid-template-columns: 1fr;
    }

    .cta-content {
        flex-direction: column;
        justify-content: flex-start;
        gap: 2rem;
    }

    .cta-text {
        max-width: 100%;
    }

    .cta-buttons {
        align-self: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .pub-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
8. FULLSCREEN MENU
========================================== */
    .fullscreen-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #0f0f0f;
        color: white;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    .fullscreen-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    .fullscreen-menu .menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem 2rem;
        width: 100%;
    }

    .fullscreen-menu .btn-close-menu {
        background: transparent;
        border: none;
        color: white;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: color 0.3s;
        font-family: inherit;
    }

    .fullscreen-menu .btn-close-menu:hover {
        color: var(--primary);
    }

    .fullscreen-menu .btn-close-menu svg {
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        padding: 2px;
        width: 24px;
        height: 24px;
        transition: border-color 0.3s;
    }

    .fullscreen-menu .btn-close-menu:hover svg {
        border-color: var(--primary);
    }

    .fullscreen-menu .menu-body {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 8rem;
        margin-top: -2rem;
        /* Visually center taking header into account */
    }

    .main-menu-list {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        width: 45%;
    }

    .menu-item>a {
        font-size: 4.5rem;
        font-weight: 400;
        letter-spacing: -1px;
        color: #f1f1f1;
        transition: color 0.3s;
        font-family: 'Slabo 27px', serif;
        /* Elegant serif like the reference image */
    }

    .menu-item>a:hover, .menu-item>a.active-link {
        color: var(--primary);
    }
    
    .menu-item>a.active-link {
        text-decoration: underline;
        text-underline-offset: 8px;
        text-decoration-thickness: 3px;
        text-decoration-color: white;
        color: white;
    }

    .menu-item.login-item {
        margin-top: 3rem;
    }

    .menu-item.login-item>a {
        font-size: 1.1rem;
        color: #666;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-family: 'Slabo 27px', serif;
        transition: color 0.3s;
    }

    .menu-item.login-item>a:hover {
        color: #bbb;
    }

    .submenu {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translateY(-50%);
        width: 45%;
        padding-left: 0;
        border-left: none;
        margin-top: 0;
        display: none;
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 0;
    }

    .submenu.active {
        display: flex;
        animation: fadeInRight 0.3s ease forwards;
    }

    .submenu li a {
        font-size: 2.5rem;
        font-weight: 700;
        color: white;
        transition: color 0.3s;
        font-family: 'Merriweather Sans', sans-serif;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .submenu li a:hover {
        color: var(--primary);
    }

    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translate(-20px, -50%);
        }

        to {
            opacity: 1;
            transform: translate(0, -50%);
        }
    }

    @media (max-width: 768px) {
        .menu-item>a {
            font-size: 3rem;
        }

        .submenu {
            position: relative;
            left: 0;
            top: 0;
            transform: none;
            width: 100%;
            padding-left: 2rem;
            border-left: 2px solid var(--primary);
            gap: 1rem;
        }
        
        .submenu.active {
            animation: fadeInDown 0.3s ease forwards;
        }

        .submenu li a {
            font-size: 1.8rem;
        }

        .fullscreen-menu .menu-body {
            padding: 0 2rem;
            margin-top: 0;
        }
        
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    }

/* ==========================================
   9. CARRERAS PAGE
   ========================================== */
.hero-carreras .hero-content {
    justify-content: flex-start;
}

.hero-carreras .hero-text-box {
    text-align: left;
}

.filtros-section {
    padding: 4rem 0 2rem 0;
    background-color: var(--bg-color);
}

.filtros-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-filtro {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--text-dark);
    background-color: transparent;
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.btn-filtro:hover, .btn-filtro.active {
    background-color: var(--text-dark);
    color: var(--bg-color);
}

.lista-academica {
    padding: 0 0 6rem 0;
    background-color: var(--bg-color);
}

.tabla-academica {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tabla-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 2px solid var(--text-dark);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tabla-row {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--text-dark);
    transition: background-color 0.3s ease;
}

.tabla-row:hover {
    background-color: #f9fafb;
}

.col-nombre {
    flex: 2;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.col-duracion {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background-color: var(--section-bg);
    color: var(--tertiary);
    border: 1px solid #ddd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .tabla-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .col-duracion {
        text-align: left;
    }
}

/* ==========================================
   10. CAREER DETAILS MODAL
   ========================================== */
.career-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.career-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.career-modal-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 80vw;
    max-width: 1200px;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.career-modal-content.active {
    transform: translateX(0);
}

.btn-close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 20;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.3s, transform 0.3s;
    backdrop-filter: blur(5px);
}

.btn-close-modal:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.modal-header-image {
    position: relative;
    width: 100%;
    height: 350px;
}

.modal-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    /* Complementary color to primary (orange) is a blueish tone. Using var(--secondary) */
    background: linear-gradient(to top, rgba(3, 123, 170, 0.95) 0%, rgba(3, 123, 170, 0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem 3rem;
}

.modal-career-title {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 3rem;
}

.modal-info-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f1f1f1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 1rem;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-weight: 800;
    color: var(--tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    width: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label i {
    color: var(--secondary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.info-value {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.modal-section {
    margin-bottom: 3rem;
}

.modal-section-title {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.modal-accordion {
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--section-bg);
    cursor: pointer;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #ebebeb;
}

.accordion-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.modal-accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-body {
    padding: 2rem;
    color: #444;
    line-height: 1.8;
}

.authority-card, .arancel-card {
    background: var(--section-bg);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid var(--secondary);
    margin-bottom: 1.5rem;
}

.authority-card.orange-border, .arancel-card.orange-border {
    border-left-color: var(--primary);
}

.auth-sede {
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.auth-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem 1.5rem;
    align-items: center;
}

.auth-label {
    font-weight: 800;
    color: var(--tertiary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.auth-value {
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .career-modal-content {
        width: 100vw;
    }
    
    .modal-header-image {
        height: 250px;
    }
    
    .modal-career-title {
        font-size: 2rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-label {
        width: 100%;
    }
    
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .auth-label {
        margin-top: 1rem;
    }
    
    .auth-label:first-child {
        margin-top: 0;
    }
}

/* ==========================================
   10. BLOG PAGE
   ========================================== */
.blog-page {
    background-color: var(--section-bg);
}

.blog-header {
    position: relative; /* Overrides position: absolute from index if needed, but wait, the header global is position: absolute */
    background-color: #0d0d0d;
}

/* Because standard header is absolute, we need to push the blog container down or override header position */
header.blog-header {
    position: relative;
    z-index: 100;
}

/* Blog Header Dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1a1a1a;
    min-width: 200px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 200;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-menu a {
    color: white;
    padding: 1.2rem 1.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #333;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--primary);
    color: white;
}

.blog-container {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start; /* Crucial for sticky sidebar to work */
}

/* Featured Post */
.featured-post {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.featured-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.featured-post::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2.5rem;
    z-index: 10;
    color: white;
}

.category-tag {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.featured-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-family: 'Outfit', sans-serif;
}

/* Blog News Grid */
.blog-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background-color: white;
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: var(--section-bg);
    border-color: var(--tertiary);
}

.page-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-dots {
    color: var(--tertiary);
    font-weight: 600;
}

/* Sidebar */
.blog-sidebar {
    height: 100%;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem; /* The distance from top when scrolling */
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sidebar-news-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sidebar-news-item:hover {
    transform: translateX(5px);
}

.sidebar-news-img {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-news-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.sidebar-news-item:hover .sidebar-news-info h5 {
    color: var(--primary);
}

.sidebar-news-info span {
    font-size: 0.8rem;
    color: var(--tertiary);
}

/* Responsive Blog */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-title {
        font-size: 1.8rem;
    }
    
    .featured-img {
        height: 350px;
    }
}

/* ==========================================
   11. INDIVIDUAL POST PAGE
   ========================================== */
.post-container {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.post-back-nav {
    margin-bottom: 2rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--tertiary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-back:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.post-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Left Column */
.post-img-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.post-img-container img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tertiary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eaeaea;
}

.post-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-text p {
    margin-bottom: 1.5rem;
}

.post-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: var(--secondary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-text blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--primary);
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    background-color: white;
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Right Column (Sidebar) */
.sticky-meta {
    position: sticky;
    top: 2rem;
    background-color: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.post-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeaea;
}

.post-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    font-weight: 700;
    color: var(--text-dark);
}

.author-info span {
    font-size: 0.85rem;
    color: var(--tertiary);
}

.post-share {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeaea;
}

.post-share span {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tertiary);
    margin-bottom: 0.8rem;
}

.share-icons {
    display: flex;
    gap: 0.8rem;
}

.share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--section-bg);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.share-icons a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Responsive Post */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .post-main {
        order: 2; /* Main content below meta on mobile */
    }

    .post-sidebar {
        order: 1; /* Meta info above content on mobile */
    }
    
    .sticky-meta {
        position: static;
        box-shadow: none;
        padding: 0;
        background: transparent;
        border-bottom: 2px solid #eaeaea;
        padding-bottom: 2rem;
        border-radius: 0;
    }
}