:root {
    --bg-0: #f5f6fa;
    --bg-1: #e8ecf3;
    --bg-2: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --border: rgba(108, 129, 172, 0.20);
    --border-strong: rgba(108, 129, 172, 0.42);
    --text: #1a2238;
    --text-muted: #5a6b88;
    --text-dim: #8e9ab4;
    --accent: #6c81ac;
    --accent-2: #4d6390;
    --accent-glow: rgba(108, 129, 172, 0.30);
    --danger: #d83048;
    --success: #1a9d6f;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 10px 40px rgba(20, 40, 80, 0.08);
    --shadow-glow: 0 0 60px var(--accent-glow);
    --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108, 129, 172, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(77, 99, 144, 0.08), transparent 50%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; position: relative; }
.section-sm { padding: 50px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title .eyebrow { color: var(--accent-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; }
.section-title h2 { margin-top: 8px; }
.section-title p { color: var(--text-muted); max-width: 640px; margin: 8px auto 0; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #fff;
    box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px var(--accent-glow); color: #fff; }
.btn-ghost {
    background: rgba(108, 129, 172, 0.06);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(108, 129, 172, 0.12); border-color: var(--accent); color: var(--text); }

.glass {
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}
.brand img { height: 56px; width: auto; max-width: 220px; }
@media (max-width: 900px) { .brand img { height: 44px; max-width: 180px; } }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.02em; color: var(--text); }
.brand .brand-sub { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.05em; }

.nav-menu { display: flex; gap: 4px; align-items: center; list-style: none; padding: 0; margin: 0; }
.nav-menu a {
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.98rem;
    font-weight: 500;
    transition: all var(--t);
}
.nav-menu a:hover { color: var(--text); background: rgba(108, 129, 172, 0.10); }
.nav-menu a.active { color: var(--accent-2); background: rgba(108, 129, 172, 0.15); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; padding: 8px; }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: var(--surface-strong);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--t);
    }
    .nav-menu.open { max-height: 500px; padding: 16px; }
    .nav-menu a { display: block; }
}

/* === FOOTER === */
.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 { color: var(--text); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 18px; }
.footer-col p, .footer-col li { color: var(--text-muted); font-size: 0.97rem; line-height: 1.7; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-2); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(108, 129, 172, 0.08);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--t);
}
.social-links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 80px 0;
}
.hero-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.32;
    display: block;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(108, 129, 172, 0.12);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--accent-2);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 24px;
}
.hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 10px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}
.hero p.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 620px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* === CARDS / GRIDS === */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--t);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(108, 129, 172, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .card-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(108, 129, 172, 0.20), rgba(77, 99, 144, 0.06));
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--accent-2);
    font-size: 1.4rem;
    margin-bottom: 20px;
}
.card h3 { color: var(--text); margin-bottom: 12px; }
.card p { color: var(--text-muted); margin: 0; }
.card ul { padding-left: 20px; color: var(--text-muted); margin: 14px 0 0; }
.card ul li { margin-bottom: 6px; font-size: 0.9rem; }

/* Reference card */
.ref-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-2);
    border: 1px solid var(--border);
    transition: all var(--t);
    cursor: pointer;
}
.ref-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ref-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ref-card:hover img { transform: scale(1.06); }
.ref-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(20, 30, 55, 0.88) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}
.ref-card-overlay .cat {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(108, 129, 172, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    margin-bottom: 10px;
}
.ref-card-overlay h3 { color: #fff; font-size: 1.1rem; margin: 0 0 4px; }
.ref-card-overlay .loc { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.filter-bar button {
    padding: 8px 18px;
    background: rgba(108, 129, 172, 0.06);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all var(--t);
}
.filter-bar button:hover { color: var(--text); border-color: var(--border-strong); }
.filter-bar button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Page header */
.page-header {
    padding: 80px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 12px; }
.page-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* Stats / value badges */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 60px 0; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .num {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat .lbl { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; max-width: max-content; margin: 0 auto 40px; }
.tabs button {
    padding: 10px 22px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
}
.tabs button.active { background: var(--accent); color: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Detail page */
.detail-hero {
    position: relative;
    min-height: 50vh;
    display: flex; align-items: flex-end;
    padding: 60px 0 40px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.detail-hero img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.55;
}
.detail-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-0) 100%);
    z-index: 1;
}
.detail-hero .container { position: relative; z-index: 2; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery { grid-template-columns: 1fr; } }
.gallery img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    transition: all var(--t);
}
.gallery img:hover { border-color: var(--accent); transform: scale(1.02); box-shadow: var(--shadow); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(20, 30, 55, 0.92);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center; justify-content: center;
    padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.lightbox-close {
    position: absolute; top: 24px; right: 24px;
    width: 44px; height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* Contact info */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.contact-list .ic {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(108, 129, 172, 0.15);
    border-radius: 10px;
    color: var(--accent-2);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.contact-list .lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.contact-list .val { color: var(--text); font-weight: 500; }
.contact-list .val a { color: var(--text); }

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* Quality / sertifika */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.cert-grid img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: zoom-in;
    transition: all var(--t);
}
.cert-grid img:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }

.policy-list { list-style: none; padding: 0; margin: 30px 0; counter-reset: policy; display: grid; gap: 16px; }
.policy-list li {
    counter-increment: policy;
    padding: 22px 22px 22px 70px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    color: var(--text-muted);
}
.policy-list li::before {
    content: counter(policy, decimal-leading-zero);
    position: absolute;
    left: 22px; top: 22px;
    color: var(--accent-2);
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Portal forms */
.portal-page { min-height: calc(100vh - 200px); padding: 40px 0; }
.portal-card { max-width: 420px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--t);
}
.form-control:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-dim); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: rgba(216, 48, 72, 0.10); border: 1px solid rgba(216, 48, 72, 0.30); color: #a3243a; }
.alert-success { background: rgba(26, 157, 111, 0.10); border: 1px solid rgba(26, 157, 111, 0.30); color: #117350; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: rgba(108, 129, 172, 0.08); color: var(--text); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: none; }
.table td { color: var(--text-muted); font-size: 0.92rem; }
.table tr:hover td { background: rgba(108, 129, 172, 0.06); color: var(--text); }
.table .actions { display: flex; gap: 8px; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(108, 129, 172, 0.06); border: 1px solid var(--border); color: var(--text-muted); transition: all var(--t); cursor: pointer; }
.icon-btn:hover { color: var(--accent-2); border-color: var(--accent); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.portal-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 30px; }
.portal-nav a { padding: 10px 18px; border-radius: 8px; color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }
.portal-nav a.active { background: var(--accent); color: #fff; }
.portal-nav a:hover:not(.active) { background: rgba(108, 129, 172, 0.08); color: var(--text); }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(26, 157, 111, 0.15); color: #117350; }
.badge-warn { background: rgba(184, 112, 16, 0.15); color: #8a5410; }
.badge-danger { background: rgba(216, 48, 72, 0.15); color: #a3243a; }

.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Scroll-to-top */
.scroll-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-2);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(20, 40, 80, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity var(--t), transform var(--t), background var(--t);
    z-index: 90;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.scroll-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { background: var(--accent); }
@media (max-width: 600px) {
    .scroll-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
