/* HAVEC Modern Design System */
:root {
    --primary-color: #132B5B;
    /* Koyu Mavi/Lacivert */
    --secondary-color: #00A7D8;
    /* Parlak Mavi/Turkuaz */
    --accent-color: #5DCAEC;
    /* Açık Mavi (Highlights) */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --font-heading: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

/* ... existing code ... */

.hero-overlay {
    background: linear-gradient(rgba(19, 43, 91, 0.85), rgba(19, 43, 91, 0.6));
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);

    /* New Baseline (was previously 'Small') */
    font-size: 0.9rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* === HEADER & NAVIGATION === */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

/* Renamed from .navbar to avoid Bootstrap conflict */
.nav-wrapper {
    display: flex;
    flex-direction: row; /* CRITICAL: Horizontal by default */
    flex-wrap: nowrap; /* CRITICAL: No wrapping */
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    width: 100%;
}

.logo img {
    height: 55px; /* Reduced from 60px */
    width: auto;
}

.nav-menu {
    display: flex; /* CRITICAL: Flex by default */
    flex-direction: row; /* CRITICAL: Horizontal */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu>li {
    position: relative;
}

.nav-menu>li>a {
    font-weight: 600;
    color: var(--primary-color);
    padding: 10px 0;
    display: block;
}

.nav-menu>li>a:hover {
    color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--secondary-color);
    padding: 10px 0;
}

.nav-menu li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
}

/* ... existing code ... */

/* === HERO SLIDER === */
/* === HERO SLIDER (Bootstrap Override) === */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 0 !important; /* Force no padding */
    height: auto !important; /* Let image dictate height */
    min-height: 0 !important;
}

/* Fix for mobile gap: Ensure no extra spacing on mobile */
@media (max-width: 768px) {
    .hero-section {
        display: block;
        padding-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

.carousel-item {
    transition: all 0.6s ease-in-out; 
}

/* Ensure mobile caption doesn't overlap separator too much */
.carousel-caption {
    z-index: 4; /* Below separator z-index 5 */
}

/* Desktop/Tablet Caption (Default) */
@media (min-width: 769px) {
    .carousel-caption.desktop-caption {
        color: var(--primary-color) !important;
        text-shadow: none !important;
    }
    
    .carousel-caption.desktop-caption h2 {
        color: var(--primary-color) !important;
    }
}

/* Mobile Caption Specifics - FIXED (Overlay Style) */

/* Mobile Caption Specifics - FIXED (Overlay Style) */
@media (max-width: 768px) {
    .carousel-caption.mobile-caption {
        position: absolute !important; /* Back to overlay */
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 15px 15px 25px 15px !important; /* Padding for content + separator space */
        margin: 0 !important;
        /* background removed as per user request */
        text-align: left !important; /* Left alignment */
        border-top: none; 
        z-index: 4;
        /* Adjusted padding to sit nicely in the corner */
        padding: 15px 20px 25px 20px !important; 
    }
    
    .carousel-caption.mobile-caption h5 {
        font-size: 1.1rem; 
        margin-bottom: 5px;
        color: var(--primary-color) !important; /* Corporate Navy */
        text-shadow: none !important; /* Remove shadow for clean look */
        font-weight: 800; /* Extra bold for visibility */
    }

    /* Adjust button for mobile overlay */
    .carousel-caption.mobile-caption .btn {
        padding: 5px 15px;
        font-size: 0.8rem;
        /* Ensure button follows left alignment context */
        margin-right: auto;
    }
}

/* Hero Separator (Double Lines) */
.hero-separator-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    pointer-events: none;
    line-height: 0;
    font-size: 0; /* Remove potential ghost space */
}

.hero-separator-lines .line {
    width: 100%;
}

.hero-separator-lines .line.thin {
    height: 4px; 
    margin-bottom: 6px; 
    background-color: var(--secondary-color);
}

.hero-separator-lines .line.thick {
    height: 12px;
    background-color: var(--primary-color);
}

/* === RESPONSIVE MOBILE MENU === */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-wrapper {
        /* Reset Flex for Logo, but handle Toggle absolutely */
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important; /* Start with logo */
        width: 100%;
        padding: 10px 0;
        position: relative !important; /* Anchor for absolute toggle */
    }

    .logo {
        /* Ensure logo doesn't overlap toggle */
        max-width: 80%; /* Leave space for right button */
    }

    /* Double check logo sizing for mobile */
    .logo img {
        height: 40px; 
        width: auto;
    }
    
    .menu-toggle {
        display: block;
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }

    .nav-menu {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 0;
        z-index: 1000;
        gap: 0;
        margin-top: 0; /* Align perfectly */
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }


    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        padding: 15px 20px;
        display: block;
    }

    /* Submenu Mobile */
    .dropdown-menu {
        position: static; /* Stack naturally on mobile */
        float: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        display: none; /* JS to toggle or CSS hover won't work perfectly on touch, often better to always show or click */
        padding-left: 20px;
    }
    
    .nav-menu > li.active > .dropdown-menu,
    .nav-menu > li:hover > .dropdown-menu {
        display: block;
    }

    .menu-toggle {
        display: block;
        margin-left: auto; /* Force push to right if justify-content fails */
    }
}

/* Moved Desktop Query to End of File */

/* ... existing utils ... */

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* === SECTIONS === */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* === CARDS (Programs/News) === */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img {
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.card-link {
    color: var(--secondary-color);
    font-weight: 600;
}

/* === FOOTER === */
footer {
    background: var(--primary-color);
    color: #b0b8c6;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {

    /* Mobile menu needed */
    .hero-content h2 {
        font-size: 2rem;
    }
}

/* === PROGRAMS PAGE STYLES === */
.header-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.header-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header-section p {
    font-size: 1.2rem;
    opacity: 0.8;
}

.program-detail-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: var(--transition);
}

.program-detail-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.program-img {
    height: 100%;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    .program-img {
        height: 200px;
        min-height: 200px;
    }
}

/* === UTILITIES === */
.transition-hover {
    transition: all 0.3s ease;
}

.transition-hover:hover {
    .program-hero {
        height: 450px;
        background-size: cover;
        background-position: center;
        position: relative;
    }

    .program-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    }

    .program-hero .container {
        position: relative;
        z-index: 2;
    }

    .program-description {
        font-size: 1.1rem;
        line-height: 1.8;
        color: #5a5c69;
    }

    /* Accordion */
    .accordion .card {
        overflow: hidden;
    }

    .accordion .btn-link {
        color: #4e73df;
    }

    .accordion .btn-link:hover {
        text-decoration: none;
        color: #2e59d9;
    }

    .accordion .btn-link:focus {
        box-shadow: none;
    }

    /* Sidebar */
    @media (max-width: 991px) {
        .program-sidebar {
            position: static !important;
            margin-top: 3rem;
        }
    }
}

/* === CONTENT DENSITY MODES === */
/* NOTE: 'Normal' is now based on 0.9rem (previously 'Small') */

/* 1. XLARGE (Çok Geniş) */
body.density-xlarge {
    font-size: 1.1rem !important;
}

body.density-xlarge h1,
body.density-xlarge .h1 {
    font-size: 2.6rem !important;
}

body.density-xlarge h2,
body.density-xlarge .h2 {
    font-size: 2.3rem !important;
}

body.density-xlarge h3,
body.density-xlarge .h3 {
    font-size: 1.9rem !important;
}

body.density-xlarge .h4,
body.density-xlarge h5,
body.density-xlarge h6,
body.density-xlarge .card-title {
    font-size: 1.5rem !important;
}

/* 2. LARGE (Geniş) */
body.density-large {
    font-size: 1.0rem !important;
}

body.density-large h1,
body.density-large .h1 {
    font-size: 2.4rem !important;
}

body.density-large h2,
body.density-large .h2 {
    font-size: 2.1rem !important;
}

body.density-large h3,
body.density-large .h3 {
    font-size: 1.7rem !important;
}

body.density-large .h4,
body.density-large h5,
body.density-large h6,
body.density-large .card-title {
    font-size: 1.3rem !important;
}

/* 3. NORMAL (Orta/Standard - Equal to old 'Small' 0.9rem) */
body.density-normal {
    font-size: 0.9rem !important;
}

body.density-normal h1,
body.density-normal .h1 {
    font-size: 2rem !important;
}

body.density-normal h2,
body.density-normal .h2 {
    font-size: 1.8rem !important;
}

body.density-normal h3,
body.density-normal .h3 {
    font-size: 1.35rem !important;
}

body.density-normal .card-title {
    font-size: 1.1rem !important;
}

body.density-normal h6,
body.density-normal .h6 {
    font-size: 1rem !important;
}

/* 4. SMALL (Küçük) */
body.density-small {
    font-size: 0.8rem !important;
}

body.density-small h1,
body.density-small .h1 {
    font-size: 1.8rem !important;
}

body.density-small h2,
body.density-small .h2 {
    font-size: 1.6rem !important;
}

body.density-small h3,
body.density-small .h3 {
    font-size: 1.25rem !important;
}

body.density-small .card-title {
    font-size: 0.95rem !important;
}

/* 5. TINY (Çok Küçük) */
body.density-tiny {
    font-size: 0.75rem !important;
}

body.density-tiny h1,
body.density-tiny .h1 {
    font-size: 1.6rem !important;
}

body.density-tiny h2,
body.density-tiny .h2 {
    font-size: 1.4rem !important;
}

body.density-tiny h3,
body.density-tiny .h3 {
    font-size: 1.1rem !important;
}

body.density-tiny .card-title {
    font-size: 0.9rem !important;
}


/* Specific Tweak for News/Announcements on Small/Tiny */
body[class*="density-small"] .card-body,
body[class*="density-tiny"] .card-body {
    padding: 10px !important;
}

/* Fix for Input Group Alignment vs Density - Allow Inputs to auto-size */
.form-control {
    height: auto !important;
}

/* === RICH TEXT CONTENT STYLES (Global Fix) === */
/* Restores bullet points and list numbering in content areas where global reset hid them */
.content-body ul,
.program-description ul,
.alert ul,
.rich-text ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1rem;
}

.content-body ol,
.program-description ol,
.alert ol,
.rich-text ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1rem;
}

.content-body li,
.program-description li,
.alert li,
.rich-text li {
    display: list-item;
}

/* Force Desktop Alignment (>768px) - AGGRESSIVE OVERRIDE */
@media (min-width: 769px) {
    /* CRITICAL: Force horizontal layout */
    header .container .nav-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        width: 100% !important;
    }
    
    header .container .nav-wrapper .logo {
        flex: 0 0 auto !important;
        margin-right: 10px !important; /* Reduced from 20px */
        order: 1 !important;
    }
    
    header .container .nav-wrapper .logo img {
        height: 55px !important; /* Reduced from 60px */
        width: auto !important;
        max-width: 100% !important;
    }

    /* CRITICAL: Force menu to display horizontally */
    header .container .nav-wrapper .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        margin-left: auto !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        order: 2 !important;
        flex-wrap: nowrap !important;
    }
    
    header .container .nav-wrapper .nav-menu > li {
        display: inline-block !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        border: none !important;
        float: none !important;
    }
    
    header .container .nav-wrapper .nav-menu > li > a {
        padding: 10px 12px !important;
        white-space: nowrap !important;
        font-size: 0.95rem !important;
        display: inline-block !important;
    }

    /* CRITICAL: Hide mobile toggle on desktop */
    header .container .nav-wrapper .menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}