:root {
    --primary: #1e4620;
    /* Deep Forest Green */
    --secondary: #2E7D32;
    /* Rich Green */
    --accent: #C5A059;
    /* Metallic Gold */
    --dark: #1a1a1a;
    --text: #333333;
    --light-bg: #FFFFFF;
    --section-bg: #f9fdf9;
    --radius: 4px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: #f4f4f4;
    margin: 0;
    line-height: 1.7;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Controls */
.controls-bar {
    background: var(--dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.lang-btn,
.print-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ccc;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.lang-btn:hover,
.print-btn:hover,
.lang-btn.active {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
    font-weight: 700;
}

/* Header */
header {
    background: white;
    padding: 30px 0;
    border-bottom: 3px solid var(--accent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 1px;
    color: var(--primary);
}

.logo p {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
    font-weight: 600;
}

.contact-header p {
    margin: 5px 0;
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.contact-header i {
    color: var(--accent);
}

/* Hero */
.hero {
    position: relative;
    height: 450px;
    background-image: url('img/hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 50px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.hero h2 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    color: #eee;
    font-weight: 300;
    margin: 0;
}

/* Sections */
.section {
    background: white;
    padding: 50px 60px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto 0;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.two-col h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary);
    border-left: 4px solid var(--accent);
    padding-left: 15px;
}

/* Stats */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--primary);
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
}

.stat .num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 5px;
}

.stat .lbl {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    border: 1px solid #eee;
    padding: 20px;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 2px;
}

.service-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.service-category {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    display: inline-block;
}

/* References */
.ref-category {
    margin-bottom: 40px;
}

.ref-category h4 {
    font-size: 1.2rem;
    color: var(--accent);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ref-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin: 0;
}

.ref-grid li {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ref-grid li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
    color: var(--primary);
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #666;
    font-style: italic;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--dark);
    color: #bbb;
    padding: 60px 0 20px;
    text-align: center;
}

.footer-info h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-info p {
    font-size: 1rem;
    margin: 5px 0;
}

.copyright {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Responsive & Print */
@media (max-width: 768px) {

    .two-col,
    .services-grid,
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .hero {
        height: 300px;
    }

    .hero h2 {
        font-size: 2rem;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body {
        background: white;
        font-size: 10pt;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color: #000;
    }

    .no-print {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    /* --- NATURAL FLOW (NO FORCED BREAKS) --- */
    .section,
    .hero,
    .footer {
        break-inside: auto;
        page-break-inside: auto;
        page-break-before: auto;
        /* Let content flow naturally */
        break-before: auto;
        page-break-after: auto;
        min-height: 0;
        height: auto;
        overflow: visible !important;
        display: block;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* --- HERO (HEADER STYLE) --- */
    .hero {
        height: 200px !important;
        /* Fixed shorter height for print header */
        margin-bottom: 20px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        page-break-inside: avoid;
        /* Keep hero content together */
    }

    .hero h2 {
        font-size: 24pt;
        /* Smaller than full slide */
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        margin-bottom: 5px;
    }

    .hero p {
        font-size: 14pt;
        color: #eee !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    /* --- CONTENT SECTIONS --- */
    .section-title {
        font-size: 16pt;
        margin-bottom: 15px;
        color: var(--primary) !important;
        border-bottom: 2px solid var(--accent);
        padding-bottom: 5px;
        page-break-after: avoid;
        /* Keep title with text */
    }

    .section-title::after {
        display: none;
    }

    /* About/History */
    .two-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-bottom: 20px;
    }

    .two-col h4 {
        font-size: 12pt;
        color: var(--secondary) !important;
        margin-bottom: 8px;
        page-break-after: avoid;
    }

    .two-col p {
        font-size: 9pt;
        line-height: 1.4;
        text-align: justify;
    }

    /* Stats */
    .stats-bar {
        padding: 10px;
        margin: 10px 0 30px 0;
        border: 1px solid #ccc;
        page-break-inside: avoid;
        display: flex;
        justify-content: space-around;
        background: #fdfdfd !important;
    }

    .stats-bar .stat {
        text-align: center;
    }

    .stat .num {
        font-size: 16pt;
        color: var(--accent) !important;
        display: block;
    }

    .stat .lbl {
        font-size: 9pt;
        color: #333;
    }

    /* Services */
    .services-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .service-category {
        margin-bottom: 20px;
        break-inside: avoid;
        /* Try to keep category together */
        page-break-inside: avoid;
    }

    .category-title {
        font-size: 11pt;
        font-weight: bold;
        color: var(--secondary);
        border-bottom: 1px solid #ddd;
        margin-bottom: 10px;
        page-break-after: avoid;
    }

    /* Compact Vertical Service Cards for better flow */
    .service-card {
        border: 1px solid #eee;
        padding: 8px;
        page-break-inside: avoid;
        display: block;
        text-align: center;
    }

    .service-card img {
        width: 100%;
        height: 60px;
        /* Visible but not dominant */
        object-fit: cover;
        margin-bottom: 5px;
    }

    .service-card h4 {
        font-size: 9pt;
        margin: 0;
        color: var(--dark) !important;
    }

    .service-card p {
        display: none;
    }

    /* References */
    .section.references {
        page-break-before: always;
    }

    .ref-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }

    .ref-grid li {
        font-size: 8pt;
        padding: 8px;
        border: 1px solid #eee;
        text-align: center;
        page-break-inside: avoid;
        background: white;
    }

    .ref-category {
        margin-bottom: 20px;
    }

    /* Force "İnşaat, Enerji & Gayrimenkul" (2nd category) to new page */
    .section.references .ref-category:nth-of-type(2) {
        page-break-before: always;
    }

    /* Footer */
    .footer {
        border-top: 2px solid #333;
        margin-top: 30px !important;
        padding-top: 20px !important;
        background: transparent !important;
        /* Ink saving */
        color: black !important;
        text-align: center;
        page-break-before: always;
    }

    .footer-content {
        display: block;
    }

    .footer-info h4 {
        color: var(--primary) !important;
        font-size: 12pt;
        margin-bottom: 10px;
    }

    .footer-info p {
        color: black !important;
        font-size: 9pt;
        margin: 3px 0;
    }

    .copyright {
        color: #666 !important;
        border-top: 1px solid #ccc;
        margin-top: 15px;
        padding-top: 10px;
    }
}