:root {
    --primary-color: #0A2540;
    --secondary-color: #A9C2EB;
    --bg-color: #F8FAFC;
    --text-color: #333333;
    --white: #FFFFFF;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 35px; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(169, 194, 235, 0.2); 
    transition: all var(--transition-speed) ease; 
    box-sizing: border-box;
}

.header.scrolled { 
    padding: 10px 35px; 
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); 
}

.logo img { 
    height: 48px; 
    border-radius: 8px; 
    object-fit: contain; 
    transition: 0.3s ease; 
}
.logo a:hover img { transform: scale(1.03); }

.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-group { display: flex; align-items: center; gap: 8px; }

.nav-item {
    text-decoration: none;
    font-weight: 700;
    font-size: 14.5px;
    padding: 9px 16px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-item-default { color: #0A2540; background: #F1F5F9; border: 1px solid #E2E8F0; }
.nav-item-default:hover, .nav-item-default.active { background: #0A2540; color: #FFFFFF; border-color: #0A2540; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(10,37,64,0.15); }

.nav-item-wifi { color: #1D4ED8; background: #EFF6FF; border: 1.5px solid #93C5FD; box-shadow: 0 2px 8px rgba(37,99,235,0.1); }
.nav-item-wifi:hover { background: #2563EB; color: #FFFFFF; border-color: #2563EB; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(37,99,235,0.25); }

.nav-item-kygui { color: #047857; background: #ECFDF5; border: 1.5px solid #A7F3D0; }
.nav-item-kygui:hover { background: #059669; color: #FFFFFF; border-color: #059669; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(5,150,105,0.25); }

.nav-item-tuvan { color: #C2410C; background: #FFF7ED; border: 1.5px solid #FFEDD5; }
.nav-item-tuvan:hover { background: #EA580C; color: #FFFFFF; border-color: #EA580C; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(234,88,12,0.25); }

.divider { width: 1px; height: 26px; background: #CBD5E1; margin: 0 4px; }

.btn-action { padding: 10px 22px; border-radius: 12px; font-weight: 800; font-size: 14.5px; text-decoration: none; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-outline { border: 2px solid #0A2540; color: #0A2540; background: transparent; }
.btn-outline:hover { background: #0A2540; color: white; }
.btn-fill { background: linear-gradient(135deg, #0A2540, #174276); color: white; border: none; box-shadow: 0 4px 15px rgba(10,37,64,0.25); }
.btn-fill:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(10,37,64,0.35); color: white; }

.mobile-toggle { display: none; font-size: 24px; color: #0A2540; background: none; border: none; cursor: pointer; }

.hero-modern { 
    position: relative; 
    padding: 120px 20px 80px 20px; 
    background: linear-gradient(180deg, #0A2540 0%, #174276 70%, var(--bg-color) 100%); 
    color: var(--white); 
    text-align: center; 
}

.hero-content { position: relative; z-index: 2; margin-bottom: 25px; }

.hero-content h1 { 
    font-size: 2.8em; 
    font-weight: 800; 
    margin-bottom: 12px; 
    line-height: 1.25; 
    background: linear-gradient(to right, #ffffff, #A9C2EB); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.hero-content p { font-size: 1.1em; color: #E2E8F0; max-width: 650px; margin: 0 auto; }

.floating-search { 
    position: relative; 
    z-index: 10; 
    max-width: 900px; 
    margin: 0 auto; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(20px);
    padding: 20px; 
    border-radius: 24px; 
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.18); 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.8); 
}

.search-row-inputs {
    display: flex;
    gap: 10px;
    width: 100%;
}

.floating-search select { 
    flex: 1;
    border: 1px solid #CBD5E1; 
    padding: 14px 16px; 
    background: #F8FAFC; 
    border-radius: 12px; 
    font-size: 0.95em; 
    color: var(--primary-color); 
    font-weight: 600; 
    outline: none; 
    cursor: pointer; 
    transition: 0.3s; 
}
.floating-search select:hover { background: #E2E8F0; }

.school-search-box {
    position: relative;
    width: 100%;
}

.school-search-box input {
    width: 100%; 
    padding: 14px 18px; 
    border: 2px solid #CBD5E1; 
    border-radius: 12px; 
    outline: none; 
    background: rgba(241, 245, 249, 0.9); 
    color: #0A2540; 
    font-weight: 600;
    font-size: 0.95em;
    box-sizing: border-box;
}

#school-suggestions {
    position: absolute; 
    top: 105%; 
    left: 0; 
    right: 0; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(15px); 
    border: 1px solid rgba(203, 213, 225, 0.8); 
    border-radius: 12px; 
    max-height: 200px; 
    overflow-y: auto; 
    z-index: 1000; 
    display: none; 
    box-shadow: 0 10px 25px rgba(10,37,64,0.15); 
    text-align: left;
}

.suggestion-item {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    font-size: 0.92em;
    color: #0A2540;
    font-weight: 600;
}

.suggestion-item:hover {
    background: rgba(235, 243, 255, 0.8);
}

.btn-search-submit {
    width: 100%; 
    border-radius: 12px; 
    padding: 14px; 
    background: linear-gradient(135deg, var(--primary-color), #174276); 
    color: white; 
    border: none; 
    font-weight: bold; 
    font-size: 1.05em;
    cursor: pointer; 
    box-shadow: 0 10px 20px rgba(10,37,64,0.2);
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-search-submit:hover {
    background: #174276;
    transform: translateY(-2px);
}

.section-tag { 
    display: inline-block; 
    background: #EBF3FF; 
    color: var(--primary-color); 
    padding: 6px 18px; 
    border-radius: 20px; 
    font-size: 0.85em; 
    font-weight: 700; 
    margin-bottom: 8px; 
    text-transform: uppercase; 
}

.category-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; margin-top: 40px; }
.category-header h2 { color: var(--primary-color); font-size: 1.8em; font-weight: 800; }

.view-all { color: var(--primary-color); font-weight: bold; font-size: 1em; transition: 0.3s; }
.view-all:hover { color: #174276; transform: translateX(5px); }

.room-grid { 
    display: grid; 
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
    gap: 25px; 
    margin-bottom: 30px;
}

.room-card { 
    background: var(--white); 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 8px 25px rgba(10, 37, 64, 0.05); 
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1); 
    border: 1px solid rgba(169, 194, 235, 0.3); 
    display: flex; 
    flex-direction: column; 
}

.room-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.room-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 15px 35px rgba(10, 37, 64, 0.12); 
    border-color: rgba(10, 37, 64, 0.2); 
}

.image-wrapper { position: relative; overflow: hidden; height: 185px; background: #E2E8F0; }

.room-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); 
}
.room-card:hover img { transform: scale(1.08); }

.district-badge { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    background: rgba(10, 37, 64, 0.85); 
    backdrop-filter: blur(6px); 
    color: var(--white); 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 0.78em; 
    font-weight: 700; 
    z-index: 2; 
}

.room-info { padding: 18px; display: flex; flex-direction: column; flex: 1; }

.room-info h3 { 
    font-size: 1.05em; 
    margin-bottom: 8px; 
    color: var(--primary-color); 
    font-weight: 700; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    transition: color 0.2s ease; 
}
.room-card:hover .room-info h3 { color: #174276; }

.room-meta { 
    font-size: 0.85em; 
    color: #64748B; 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.room-price-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-top: 1px solid #F1F5F9; 
    padding-top: 12px; 
    margin-top: auto; 
}

.room-price { color: #E53935; font-weight: 800; font-size: 1.15em; white-space: nowrap; }
.room-price span { font-size: 0.6em; color: #64748B; font-weight: normal; }

.btn-view-room { 
    background: #EBF3FF; 
    color: var(--primary-color); 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-weight: 700; 
    font-size: 0.82em; 
    transition: all 0.3s ease; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
}
.room-card:hover .btn-view-room { background: var(--primary-color); color: white; transform: translateX(2px); }

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748B;
    font-style: italic;
    padding: 30px 0;
}

.cta-container { 
    max-width: 1200px; 
    margin: 60px auto 40px auto; 
    background: linear-gradient(135deg, var(--primary-color), #174276); 
    color: var(--white); 
    border-radius: 20px; 
    padding: 40px 50px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    box-shadow: 0 15px 35px rgba(10,37,64,0.2); 
}

.cta-content h2 { font-size: 1.8em; font-weight: 800; margin-bottom: 8px; }
.cta-content p { color: #CBD5E1; font-size: 1em; }

.btn-cta { 
    background: var(--white); 
    color: var(--primary-color); 
    padding: 14px 30px; 
    border-radius: 25px; 
    font-weight: bold; 
    font-size: 1.05em; 
    transition: all 0.3s ease; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    white-space: nowrap;
}
.btn-cta:hover { transform: translateY(-3px); background: #F8FAFC; color: #174276; }

.footer {
    background: #0A2540;
    color: #CBD5E1;
    padding: 50px 20px 30px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 60px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-brand img {
    height: 45px;
    width: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
}
.footer-brand p {
    font-size: 0.92em;
    line-height: 1.7;
    color: #94A3B8;
    margin-bottom: 12px;
}
.footer-col h4 {
    color: #FFFFFF;
    font-size: 1.1em;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background: #2563EB;
    border-radius: 2px;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.92em;
    transition: 0.25s ease;
    font-weight: 500;
}
.footer-links a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85em;
    color: #64748B;
}

@media (max-width: 1180px) {
    .header { padding: 12px 20px; }
    .mobile-toggle { display: block; }
    .nav-links { 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(20px); 
        flex-direction: column; 
        align-items: stretch; 
        padding: 20px; 
        gap: 12px; 
        box-shadow: 0 12px 30px rgba(0,0,0,0.12); 
        display: none; 
        box-sizing: border-box; 
    }
    .nav-group { flex-direction: column; align-items: stretch; gap: 10px; }
    .nav-links.active { display: flex; }
    .divider { width: 100%; height: 1px; margin: 4px 0; }
    .btn-action { width: 100%; justify-content: center; }
}

@media (max-width: 992px) {
    .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-content h1 { font-size: 2.2em; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .hero-modern { padding: 100px 15px 50px 15px !important; }
    .hero-content h1 { font-size: 1.65em !important; margin-bottom: 8px !important; }
    .hero-content p { font-size: 0.88em !important; padding: 0 10px; }
    
    .floating-search { padding: 14px !important; border-radius: 18px !important; margin: 0 10px !important; gap: 10px !important; }
    .search-row-inputs { flex-direction: column !important; gap: 8px !important; }
    .floating-search select, .school-search-box input, .btn-search-submit { padding: 11px 14px !important; font-size: 0.88em !important; border-radius: 10px !important; }
    
    .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .room-card .room-info { padding: 10px !important; }
    .room-card .image-wrapper { height: 120px !important; }
    .room-card .room-info h3 { font-size: 0.9em !important; margin-bottom: 4px !important; }
    .room-card .room-meta { font-size: 0.75em !important; margin-bottom: 8px !important; }
    .room-card .room-price { font-size: 1em !important; }
    .btn-view-room { padding: 4px 8px !important; font-size: 0.75em !important; }
    .district-badge { top: 6px !important; right: 6px !important; padding: 2px 6px !important; font-size: 0.65em !important; }
    
    .category-header h2 { font-size: 1.3em !important; }
    .cta-container { padding: 25px 15px !important; margin: 30px 10px !important; flex-direction: column !important; text-align: center; gap: 15px; }
    .cta-container h2 { font-size: 1.35em !important; }
    .cta-container p { font-size: 0.88em !important; }
    .footer-container { grid-template-columns: 1fr; gap: 25px; }
}