/* ==========================================================================
   Common CSS - Bilgin Grup Yapi A.S.
   Shared styles across all pages
   ========================================================================== */

/* ===== 1. Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== 2. CSS Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 3. CSS Variables ===== */
:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --primary-lighter: #334155;
    --accent: #C5986B;
    --accent-hover: #A67C52;
    --accent-light: #D4A574;
    --text: #334155;
    --text-light: #64748B;
    --bg: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 4. Body Styles ===== */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== 5. Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 6. Loading Screen ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading.removed {
    display: none;
}

/* ===== 7. Header / Nav (subpage solid white bg version) ===== */
header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal), border-color var(--transition-normal);
    will-change: transform;
}

header.header-hidden {
    transform: translateY(-100%);
}

header.scrolled {
    box-shadow: 0 2px 20px rgba(15, 23, 42, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.logo img {
    height: 35px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    transition: color var(--transition-normal);
}

.mobile-menu-btn:hover {
    color: var(--accent);
}

/* ===== 8. Page Header ===== */
.page-header {
    background: linear-gradient(135deg, #FDF9F2 0%, #F5E6D3 100%);
    padding: 140px 0 80px;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-header p {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* ===== 9. Breadcrumb ===== */
.breadcrumb {
    background: var(--bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumb-list a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    color: var(--accent-hover);
}

/* ===== 10. Section Styles ===== */
section {
    padding: 80px 0;
}

/* ===== 11. Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* ===== 12. Fade-in Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 13. Mobile Overlay ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== 14. Footer ===== */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0;
}

/* ===== 15. Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== 16. Responsive Breakpoints ===== */

/* --- 1024px --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
}

/* --- 768px --- */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 90%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 0;
        transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 999;
        box-shadow: -10px 0 50px rgba(15, 23, 42, 0.3);
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        margin-bottom: 0.5rem;
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a {
        display: block;
        padding: 1.2rem 1.5rem;
        text-align: left;
        border-radius: 12px;
        margin-bottom: 0;
        background: transparent;
        border: none;
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--text);
        transition: color 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--accent);
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
        transition: transform 0.3s ease, color 0.3s ease;
        position: relative;
    }

    .mobile-menu-btn.active {
        transform: rotate(90deg);
        color: var(--accent);
    }

    .page-header {
        padding: 120px 0 60px;
    }

    section {
        padding: 60px 0;
    }
}

/* --- 480px --- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}
