/* css/sub/pages/health-library.css */
/* ============================================================
   HEALTH LIBRARY (MAIN HUB) - V3.0 (HERO TYPO UPDATE)
   Update: Desktop Hero Title set to 48px/700/53px.
   ============================================================ */

/* ============================================================
   GLOBAL & RESET
   ============================================================ */
body, html {
    overflow-x: clip; 
    background-color: #fafafa !important; 
}

h1, h2, h3, h4, h5, h6, p, ul, li {
    margin-top: 0;
    margin-bottom: 0;
}

/* KONTEYNER */
.lib-main-container {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 80px;
    padding-top: 0 !important; 
}

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.info-social-top {
    display: flex;
    align-items: center;
    gap: 1.25rem; 
    margin-bottom: 50px !important; 
    margin-top: 25px; 
}

.info-social-top a {
    color: #00325B;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem; 
    height: 1.2rem;
    transition: color 0.3s ease;
}

.info-social-top a:hover { color: #0071CE; }
.info-social-top a svg { width: 100%; height: 100%; }

/* ============================================================
   1. HERO SECTION (BASE - DESKTOP)
   ============================================================ */
.lib-hero {
    position: relative; 
    width: 100%;
    height: 400px !important; /* BASE HEIGHT */
    min-height: 400px !important; 
    max-height: 400px !important;
    background-size: cover; 
    background-position: center center;
    background-repeat: no-repeat; 
    display: flex;
    align-items: center !important; 
    justify-content: flex-start !important; 
    padding: 0 !important; 
    margin: 0; 
    margin-bottom: 0 !important; 
    overflow: hidden;
}

.lib-hero-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: linear-gradient(to right, rgba(0,50,91,0.8), rgba(0,50,91,0.4));
    z-index: 1;
}

.lib-hero .sub-page-container {
    width: 100% !important;
    position: relative;
    z-index: 2;
    display: block !important;
}

.lib-hero-content {
    width: 100%;
    max-width: 800px;
    text-align: left; 
    color: #fff;
}

/* Badge */
.lib-hero-badge {
    background-color: #fff;
    color: #00325B;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    height: 30px; 
    display: inline-flex; 
    align-items: center;  
    padding: 0 15px;      
    font-size: 12px;
    font-weight: 700;
    line-height: 1;       
    margin-bottom: 20px; 
    border-radius: 4px;
}

/* [GÜNCELLEME] Title: 48px, 700, 53px */
.lib-hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 48px; 
    font-weight: 700;
    line-height: 53px;
    color: #fff;
    margin-bottom: 30px; 
}

/* ============================================================
   2. CONTENT SECTIONS
   ============================================================ */
.lib-section { margin-bottom: 110px; }
.lib-last-section { margin-bottom: 150px !important; }

.lib-sec-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid #00325B; 
    padding-bottom: 15px;
}

.lib-sec-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #00325B;
    margin: 0;
}

.lib-view-all {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #00325B;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
    cursor: pointer;
}
.lib-view-all:hover { color: #0071CE; }
.lib-view-all svg { width: 20px; height: 14px; }
.lib-view-all span { transition: transform 0.3s ease; display: inline-block; }
.lib-view-all:hover span { transform: translateX(5px); }

/* GRID */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* CARD */
.lib-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease; 
    display: flex;
    flex-direction: column;
}
.lib-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #cce4f7;
}

.lib-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: block;
}
.lib-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.lib-card:hover .lib-card-img-wrap img { transform: scale(1.05); }

.lib-card-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00325B; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

.lib-card-body { padding: 20px; flex: 1; display: flex; align-items: flex-start; }

.lib-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
.lib-card-title a { color: #00325B; text-decoration: none; transition: color 0.3s ease; }
.lib-card:hover .lib-card-title a { color: #0071CE; }

/* [YENİ] ÖNCE SAĞLIK - KATEGORİ STİLİ */
.lib-card-cat {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888; /* Gri ton */
    font-weight: 500;
    margin-top: 8px;
    display: block;
    line-height: 1.4;
}

/* ============================================================
   PARALLAX BANNER
   ============================================================ */
.lib-parallax-banner {
    position: relative;
    width: 100%;
    height: 570px !important; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    margin-bottom: 0; 
}
.lib-parallax-bg {
    position: absolute;
    top: -15%; width: 100%; left: 0; height: 130%; 
    background-size: cover; background-position: center;
    z-index: 1; will-change: transform; 
}
.lib-parallax-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 50, 91, 0.75); z-index: 2; pointer-events: none;
}
.lib-banner-text {
    position: relative; z-index: 3; color: #fff; 
    font-family: 'Inter', sans-serif; font-size: 42px; font-weight: 600; 
    line-height: 50px; max-width: 900px; text-align: left; 
}
.lib-parallax-banner .sub-page-container { position: relative; z-index: 3; width: 100%; }


/* ######################################################################
   1. FLUID SCALE (DEV EKRANLAR - 2000px+)
   ###################################################################### */
@media screen and (min-width: 2000px) {
    
    /* Konteyner Sabit 1600px + PADDING SIFIRLAMA (BIÇAK SIRTI) */
    .lib-main-container,
    .lib-hero .sub-page-container,
    .lib-parallax-banner .sub-page-container {
        width: 1600px !important;
        max-width: 1600px !important;
        padding-left: 0 !important; 
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Hero: 550px */
    .lib-hero { 
        height: 550px !important; 
        min-height: 550px !important;
        max-height: 550px !important;
    }

    /* Title: 64px */
    .lib-hero-title { font-size: 64px !important; line-height: 1.1 !important; }
    
    /* Badge: 16px */
    .lib-hero-badge { font-size: 16px !important; height: 45px !important; padding: 0 25px !important; }

    /* Section Title: 48px */
    .lib-sec-title { font-size: 48px !important; }

    .lib-view-all { font-size: 24px !important; }
    .lib-view-all svg { width: 30px !important; height: 20px !important; }

    .lib-grid { grid-template-columns: repeat(4, 1fr); gap: 50px; }
    .lib-card-title { font-size: 24px !important; }
    .lib-card-icon { width: 48px !important; height: 48px !important; }

    /* Parallax Fluid */
    .lib-parallax-banner { height: 750px !important; }
    .lib-banner-text { font-size: 80px !important; line-height: 90px !important; }
}


/* ######################################################################
   2. TABLET 13" (1000px - 1200px)
   ###################################################################### */
@media screen and (min-width: 1000px) and (max-width: 1200px) {
    
    /* Konteyner */
    .lib-main-container, 
    .sub-page-container { 
        width: 100% !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    /* Hero: 400px */
    .lib-hero { 
        height: 400px !important; 
        min-height: 400px !important; 
    }

    /* Title: 34px */
    .lib-hero-title {
        font-size: 34px !important;
        line-height: 44px !important;
        margin-bottom: 20px !important;
    }

    /* Grid 2'li */
    .lib-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }

    /* Parallax & Banner Text */
    .lib-parallax-banner { height: 450px !important; }
    .lib-banner-text { font-size: 34px !important; line-height: 44px !important; max-width: 90% !important; }
}


/* ######################################################################
   3. TABLET 11" & AIR (700px - 999px)
   ###################################################################### */
@media screen and (min-width: 700px) and (max-width: 999px) {

    /* Konteyner */
    .lib-main-container, 
    .sub-page-container { 
        width: 100% !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }

    /* Hero: 400px */
    .lib-hero { 
        height: 400px !important; 
        min-height: 400px !important; 
    }

    /* Title: 32px */
    .lib-hero-title {
        font-size: 32px !important;
        line-height: 40px !important;
    }

    /* Grid 2'li (Daha dar aralık) */
    .lib-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px !important;
    }
    
    /* Parallax */
    .lib-parallax-banner { height: 400px !important; }
    .lib-banner-text { font-size: 30px !important; line-height: 40px !important; }
}


/* ######################################################################
   4. MOBİL CİHAZLAR (699px ve Altı)
   ###################################################################### */
@media screen and (max-width: 699px) {
    
    /* 1. ANA KONTEYNER (SOL VE SAĞ 10PX NET HİZA) */
    .lib-main-container { 
        width: 100% !important;
        padding-top: 30px; 
        padding-bottom: 50px;
        padding-left: 10px !important;  
        padding-right: 10px !important; 
        box-sizing: border-box !important;
    }
    
    /* 2. HERO BANNER - [GÜNCELLENDİ: 360px] */
    .lib-hero { 
        height: 360px !important; 
        min-height: 360px !important; 
        max-height: 360px !important;
        background-position: center 20% !important; 
        align-items: center !important; 
    }

    .lib-hero .sub-page-container {
        padding-left: 10px !important;  
        padding-right: 10px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .lib-hero-content { 
        padding: 0 !important; 
        text-align: left !important;
        width: 100% !important;
    }

    .lib-hero-title { 
        font-size: 26px !important; 
        line-height: 34px !important;
        margin-bottom: 20px; 
    }

    /* 3. BÖLÜM BAŞLIKLARI */
    .lib-sec-header {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: none !important;
        padding-bottom: 0 !important; 
        gap: 50px !important; 
        margin-bottom: 40px !important; 
    }
    
    .lib-sec-title { 
        font-size: 26px !important; 
        line-height: 1.1 !important; 
        margin: 0 !important; 
        padding: 0 !important;
    }
    
    .lib-view-all { 
        font-size: 14px; 
        align-self: flex-end; 
        margin: 0 !important; 
        padding: 0 !important;
        line-height: 1 !important; 
    }
    
    /* 4. SLIDER YAPISI */
    .lib-grid { 
        display: flex !important; 
        flex-wrap: nowrap !important; 
        overflow-x: auto !important; 
        scroll-snap-type: x mandatory; 
        scroll-snap-stop: always; 
        -webkit-overflow-scrolling: touch; 
        
        gap: 10px !important; 
        
        /* Sağdan taşma ayarı */
        width: calc(100% + 10px) !important; 
        margin-right: -10px !important; 
        padding-left: 0 !important; 
        scroll-padding-left: 0 !important;
        padding-right: 20px !important; 
        padding-bottom: 20px; 
        
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    
    .lib-grid::-webkit-scrollbar {
        display: none;
    }

    /* KART YAPISI (REVİZE EDİLDİ) */
    .lib-card {
        /* İstenilen Sabit 325px Genişlik */
        flex: 0 0 325px !important; 
        width: 325px !important;
        max-width: 85vw !important; /* Küçük ekran koruması */
        
        scroll-snap-align: start; 
        margin-bottom: 0 !important;
        background: #fff;
        border-radius: 12px;
        overflow: hidden; 
    }
    
    .lib-card-img-wrap {
        width: 100% !important;
        height: 200px !important; 
        aspect-ratio: auto !important; 
        display: block;
        position: relative;
    }
    
    .lib-card-img-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; 
        display: block;
    }

    /* Section Arası */
    .lib-section {
        margin-bottom: 70px !important;
    } 

    .lib-last-section {
        margin-bottom: 80px !important;
    }

    /* Kart Footer */
    .lib-card-body {
        min-height: 65px !important; 
        display: flex;
        align-items: center; 
        padding: 15px !important;
        
        /* [YENİ] Mobilde Kategori Yazısı için Flex Revize */
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .lib-card-title {
        font-size: 20px !important; 
        font-weight: 500 !important; 
        font-style: normal !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* [YENİ] Mobil Kategori Fontu */
    .lib-card-cat {
        font-size: 13px !important;
        margin-top: 5px !important;
    }

    /* Parallax Mobil */
    .lib-parallax-banner {
        height: 350px !important;
    }

    .lib-banner-text {
        font-size: 26px !important;
        line-height: 34px !important;
    }
}