/* ==========================================================================
   TOKİ MICROSITE DESIGN SYSTEM (BASED ON A.TOKI.GOV.TR & TOKI BRANDING)
   ========================================================================== */

:root {
    --toki-red: #C8102E;
    --toki-red-dark: #A50B24;
    --toki-red-light: #FF4D6D;
    
    --toki-blue: #006CB7;
    --toki-blue-dark: #004D84;
    --toki-blue-light: #EBF4FA;
    
    --toki-darkblue: #0F2E52;
    --toki-darkblue-hover: #1A467B;
    
    --toki-green: #00875A;
    --toki-green-dark: #006644;
    --toki-green-light: #E3FCEF;
    
    --toki-bg-light: #F4F6F9;
    --toki-card-bg: #FFFFFF;
    --toki-text-dark: #1F2937;
    --toki-text-muted: #6B7280;
    --toki-border: #E5E7EB;
    
    --font-main: 'Montserrat', 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ar: 'Tajawal', 'Montserrat', -apple-system, sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.16);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RTL OVERRIDES FOR ARABIC */
html[dir="rtl"] {
    font-family: var(--font-ar);
}

html[dir="rtl"] .header-left {
    flex-direction: row;
}

html[dir="rtl"] .stat-card {
    border-left: none;
    border-right: 4px solid var(--accent-color, var(--toki-blue));
}

html[dir="rtl"] .hero-actions {
    justify-content: flex-start;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--toki-bg-light);
    color: var(--toki-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    transition: var(--transition-fast);
}

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

/* COLOR ACCENT UTILITIES (OFFICIAL TOKI CLASSES) */
.beRed { --accent-color: var(--toki-red); }
.beBlue { --accent-color: var(--toki-blue); }
.beDarkBlue { --accent-color: var(--toki-darkblue); }
.beGreen { --accent-color: var(--toki-green); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.toki-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border-bottom: 2px solid #EEEEEE;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* T.C. Cumhurbaşkanlığı Forsu (Red Box) */
.tccb-fors-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--toki-red);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(200, 16, 46, 0.3);
    transition: transform var(--transition-fast);
}

.tccb-fors-wrapper:hover {
    transform: translateY(-2px);
}

.tccb-fors-img {
    height: 38px;
    width: auto;
}

/* Ministry & TOKİ Logos */
.ministry-toki-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-bakanlik {
    height: 42px;
    width: auto;
}

.logo-divider {
    width: 1px;
    height: 32px;
    background: #D1D5DB;
}

.logo-toki {
    height: 40px;
    width: auto;
}

/* Nav Links */
.header-nav {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--toki-darkblue);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-item:hover {
    color: var(--toki-red);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--toki-red);
    transition: width var(--transition-fast);
}

.nav-item:hover::after {
    width: 80%;
}

/* Right Header */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-ilkevim {
    height: 44px;
    width: auto;
    transition: transform var(--transition-fast);
}

.badge-ilkevim:hover {
    transform: scale(1.05);
}

.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--toki-darkblue);
    padding: 0.5rem;
}

/* Mobile Drawer */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: #FFFFFF;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 2000;
    padding: 1.5rem;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--toki-border);
    padding-bottom: 1rem;
}

.close-drawer {
    font-size: 1.5rem;
    color: var(--toki-text-dark);
}

.mobile-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--toki-darkblue);
    display: block;
    padding: 0.5rem 0;
}

.m-link-toki {
    display: inline-block;
    background: var(--toki-blue);
    color: #FFFFFF;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin-top: 1rem;
    text-align: center;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.toki-hero {
    position: relative;
    background: linear-gradient(135deg, #0F2E52 0%, #004D84 50%, #006CB7 100%);
    color: #FFFFFF;
    padding: 4.5rem 2rem 5.5rem;
    overflow: hidden;
}

.toki-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./assets/spaces/toki_hero_bg.jpg') center/cover no-repeat;
    opacity: 0.18;
    mix-blend-mode: luminosity;
}

.hero-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    z-index: 2;
}

.hero-tag-wrap {
    margin-bottom: 1rem;
}

.hero-tag {
    display: inline-block;
    background: var(--toki-red);
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.35rem 1.25rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(200, 16, 46, 0.4);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle-highlight {
    font-size: 1.35rem;
    font-weight: 700;
    color: #60A5FA;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #E2E8F0;
    max-width: 780px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.btn-toki {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.btn-toki.beRed {
    background: var(--toki-red);
    color: #FFFFFF;
}

.btn-toki.beRed:hover {
    background: var(--toki-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.5);
}

.btn-toki.beBlue {
    background: #FFFFFF;
    color: var(--toki-darkblue);
}

.btn-toki.beBlue:hover {
    background: #F1F5F9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* HERO STATS */
.hero-stats-container {
    position: relative;
    max-width: 1200px;
    margin: 3.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    z-index: 2;
}

.stat-card {
    background: #FFFFFF;
    color: var(--toki-text-dark);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-top: 4px solid var(--accent-color, var(--toki-blue));
    transition: transform var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--accent-color, var(--toki-blue));
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--toki-darkblue);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--toki-text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   MAIN CONTENT & FILTER BAR
   ========================================================================== */
.main-content-section {
    max-width: 1400px;
    margin: 3rem auto 5rem;
    padding: 0 2rem;
}

.category-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    background: #FFFFFF;
    padding: 0.75rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--toki-border);
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--toki-text-dark);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    background: var(--toki-blue-light);
    color: var(--toki-blue);
}

.filter-tab.active {
    background: var(--toki-blue);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 108, 183, 0.35);
}

.badge-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.filter-tab.active .badge-count {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   SPACES CARDS GRID
   ========================================================================== */
.spaces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.space-card {
    background: var(--toki-card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--toki-border);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

.space-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #CBD5E1;
}

.card-accent-bar {
    height: 4px;
    width: 100%;
    background: var(--accent-color, var(--toki-blue));
}

.card-img-wrap {
    position: relative;
    height: 230px;
    overflow: hidden;
    cursor: pointer;
    background: #E2E8F0;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.space-card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.vr-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 46, 82, 0.85);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hover-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 54px;
    height: 54px;
    background: var(--accent-color, var(--toki-blue));
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    transition: all var(--transition-normal);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.space-card:hover .hover-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color, var(--toki-blue));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--toki-darkblue);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--toki-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-card-launch {
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--accent-color, var(--toki-blue));
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-card-launch:hover {
    opacity: 0.92;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-card-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--toki-border);
    border-radius: var(--radius-sm);
    color: var(--toki-text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.btn-card-ext:hover {
    background: var(--toki-bg-light);
    color: var(--toki-darkblue);
    border-color: #CBD5E1;
}

/* ==========================================================================
   3D TOUR MODAL VIEWER
   ========================================================================== */
.toki-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.toki-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.toki-modal-container {
    width: 100%;
    max-width: 1300px;
    height: 88vh;
    background: #0F172A;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.toki-modal-overlay.active .toki-modal-container {
    transform: scale(1);
}

.toki-modal-header {
    background: #1E293B;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.modal-tour-title {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-actions-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-modal-ext,
.btn-modal-fullscreen,
.btn-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 38px;
    padding: 0 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.btn-modal-close {
    width: 38px;
    padding: 0;
    background: var(--toki-red);
}

.btn-modal-ext:hover,
.btn-modal-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-modal-close:hover {
    background: var(--toki-red-dark);
}

.toki-modal-body {
    flex-grow: 1;
    position: relative;
    background: #000000;
}

.toki-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--toki-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.toki-footer {
    background: var(--toki-darkblue);
    color: #CBD5E1;
    padding: 4.5rem 2rem 2.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-top-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    background: #FFFFFF;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
}

.footer-logo-csb {
    height: 38px;
}

.footer-logo-toki {
    height: 36px;
}

.footer-about-text {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 480px;
}

.footer-title {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--toki-red);
}

html[dir="rtl"] .footer-title::after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a:hover {
    color: #60A5FA;
    padding-left: 5px;
}

html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.contact-col p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-col i {
    color: var(--toki-red);
    margin-top: 3px;
}

.footer-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: #94A3B8;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-tech-credit strong {
    color: #60A5FA;
}

/* ==========================================================================
   LANGUAGE SWITCHER PILL (BOTTOM FLOATING GLASSMORPHISM)
   ========================================================================== */
.toki-lang-pill-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
}

.toki-lang-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 46, 82, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    gap: 4px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: #E2E8F0;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.lang-flag {
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.lang-btn.active {
    background: var(--toki-red);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.5);
}

.lang-pill-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1100px) {
    .spaces-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-top-row {
        grid-template-columns: 1fr 1fr;
    }
    .branding-col {
        grid-column: span 2;
    }
}

@media (max-width: 860px) {
    .header-nav {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .mobile-drawer {
        display: flex;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-subtitle-highlight {
        font-size: 1.15rem;
    }
    .spaces-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats-container {
        grid-template-columns: 1fr;
    }
    .footer-top-row {
        grid-template-columns: 1fr;
    }
    .branding-col {
        grid-column: span 1;
    }
    .d-none-mobile {
        display: none;
    }
}
