/* ==========================================================================
   1. ASOSIY SOZLAMALAR, O'ZGARUVCHILAR VA FOYDALANILUVCHI EFFEKTLAR
   ========================================================================== */
:root {
    --bg-color: #05060b;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --header-bg: rgba(10, 12, 22, 0.6);
    --header-border: rgba(251, 191, 36, 0.15);
    --nav-link-color: rgba(255, 255, 255, 0.85);
    --nav-link-bg: rgba(255, 255, 255, 0.03);
    --nav-link-border: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(255, 255, 255, 0.01);
    --card-border: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(0, 0, 0, 0.4);
    --input-border: rgba(255, 255, 255, 0.08);
    --social-bg: rgba(255, 255, 255, 0.02);
    --social-border: rgba(255, 255, 255, 0.05);
    --gold-color: #fbbf24;
    --phone-box-bg: rgba(251, 191, 36, 0.03);
    --phone-box-border: rgba(251, 191, 36, 0.3);
    --body-glow-opacity: 0.35;
    
    --theme-transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                       color 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                       border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                       background 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                       box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-color: #f8fafc; /* Slate 50 */
    --text-color: #0f172a; /* Slate 900 */
    --text-muted: rgba(15, 23, 42, 0.7);
    --header-bg: rgba(255, 255, 255, 0.75);
    --header-border: rgba(217, 119, 6, 0.3); /* Warm amber */
    --nav-link-color: rgba(15, 23, 42, 0.85);
    --nav-link-bg: rgba(0, 0, 0, 0.03);
    --nav-link-border: rgba(0, 0, 0, 0.05);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.06);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.12);
    --social-bg: rgba(0, 0, 0, 0.02);
    --social-border: rgba(0, 0, 0, 0.05);
    --gold-color: #d97706; /* Darker amber for contrast */
    --phone-box-bg: rgba(217, 119, 6, 0.03);
    --phone-box-border: rgba(217, 119, 6, 0.3);
    --body-glow-opacity: 0.12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
    /* Butun sahifa tarkibini markazda saqlash kafolati */
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%;
    transition: var(--theme-transition);
}

/* Ko'k, Qizil va Oltinrang yorug'lik effektlari (Neon Aura) */
body::before, body::after, .gold-aura {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(160px);
    opacity: var(--body-glow-opacity);
    z-index: -1;
    pointer-events: none;
    transition: var(--theme-transition);
}
body::before {
    top: 5%;
    left: -150px;
    background: #1e40af;
}
body::after {
    top: 40%;
    right: -150px;
    background: #991b1b;
}
.gold-aura {
    bottom: 10%;
    left: -100px;
    background: #d97706;
}

[data-theme="light"] body::before {
    background: #60a5fa;
}
[data-theme="light"] body::after {
    background: #f87171;
}
[data-theme="light"] .gold-aura {
    background: #fbbf24;
}

h1, h2, h3, .serif-font {
    font-family: 'Playfair Display', serif;
    transition: var(--theme-transition);
}

.gold-text {
    color: var(--gold-color);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    transition: var(--theme-transition);
}

/* ==========================================================================
   2. FLOATING MENU (IDEAL MARKAZLANGAN VA MOSLASHUVCHAN)
   ========================================================================== */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%; 
    max-width: 1100px; /* Ekran kengligiga ortiqcha kattalashib ketmasligi uchun */
    background: var(--header-bg); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--header-border);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: var(--theme-transition);
}

.logo {
    font-size: 1.2rem; 
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(45deg, #2563eb, var(--gold-color), #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0; 
    transition: var(--theme-transition);
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px; 
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 0.8rem; 
    font-weight: 600;
    padding: 6px 12px; 
    background: var(--nav-link-bg);
    border: 1px solid var(--nav-link-border);
    border-radius: 20px;
    transition: var(--theme-transition), transform 0.3s ease;
    display: inline-block;
    white-space: nowrap; 
}

nav ul li a:hover {
    color: var(--bg-color);
    background: var(--gold-color);
    border-color: var(--gold-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
}

/* ==========================================================================
   2A. HEADER ACTIONS (THEME TOGGLE & HAMBURGER)
   ========================================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Styles */
.theme-toggle {
    background: var(--nav-link-bg);
    border: 1px solid var(--nav-link-border);
    border-radius: 30px;
    width: 52px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
    transition: var(--theme-transition);
}

.theme-toggle-thumb {
    width: 22px;
    height: 22px;
    background: var(--gold-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.8s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle-thumb i {
    font-size: 0.75rem;
    color: var(--bg-color);
    transition: var(--theme-transition);
}

.theme-toggle-thumb .sun-icon {
    display: none;
}

.theme-toggle-thumb .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle-thumb {
    left: 26px;
}

[data-theme="light"] .theme-toggle-thumb .sun-icon {
    display: block;
    color: #ffffff;
}

[data-theme="light"] .theme-toggle-thumb .moon-icon {
    display: none;
}

/* Hamburger Menu Toggle Styles */
.menu-toggle {
    display: none; /* hidden on desktop & tablet */
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.8s ease;
}

/* Hamburger animations to X */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--gold-color);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--gold-color);
}

/* ==========================================================================
   3. SECTIONS (BO'LIMLARNING MUTLAQ MARKAZIY STRUKTURASI)
   ========================================================================== */
section {
    padding: 140px 20px 80px 20px;
    width: 90%; /* Ekranda ortiqcha yoyilib ketmasligi uchun */
    max-width: 1100px; /* Menu bilan bir xil simmetriyada saqlaydi */
    margin: 0 auto; 
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Tarkibni qo'shimcha ravishda o'rtaga tekislaydi */
}

.section-title {
    text-align: center;
    font-size: 2.5rem; /* Shrift sal kichraytirildi, normal ko'rinishi uchun */
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #fbbf24, #dc2626);
    border-radius: 2px;
}

/* ==========================================================================
   4. BOSH QISM (HERO SECTION - MUTLAQ SIMMETRIK MARKAZLASH)
   ========================================================================== */
   #bosh-qism {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: center; /* Elementlarni markazga zichlashtiradi */
    gap: 0px; /* Matn va rasm orasidagi chiroyli masofa */
    width: 80%;
    max-width: 1000px; /* Blok ekranda ota yoyilib ketmasligi uchun cheklov */
    margin: 0 auto; /* Konteynerni ekranning qoq markaziga olib keladi */
}

.hero-text {
    flex: 1;
    text-align: left; /* Matnning o'zi chapdan boshlanadi, lekin bloki o'rtada */
}

.hero-text h1 {
    font-size: 3.2rem; 
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
    transition: var(--theme-transition);
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #2563eb, #dc2626);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
    border-color: var(--gold-color);
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center; 
    align-items: center;
}

/* Aylana profil va uning gradient chegarasi */
.avatar-wrapper {
    position: relative;
    width: 300px; 
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, #2563eb, var(--gold-color), #dc2626);
    padding: 4px; 
    box-shadow: 0 0 35px rgba(37, 99, 235, 0.2);
    transition: 0.5s ease, var(--theme-transition);
}

.avatar-wrapper:hover {
    transform: scale(1.03) rotate(2deg);
    box-shadow: 0 0 45px rgba(251, 191, 36, 0.35);
}

/* Konteyner sozlamalari */
.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;      /* Dumaloq qilish */
    overflow: hidden;        /* Konteynerdan toshganini yashirish */
    display: flex;
    justify-content: center; /* Gorizontal markazga joylash */
    align-items: center;     /* Vertikal markazga joylash */
    position: relative;      
}

/* Rasm sozlamalari */
.avatar-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    
    /* ASOSIY YECHIM: */
    object-fit: cover;       /* Rasmni konteynerga moslash */
    object-position: center; /* Rasmni aniq markazdan tekislash */
    z-index: 2;
}


.avatar-placeholder {
    position: absolute;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.15);
    animation: float 3s ease-in-out infinite;
    z-index: 1;
}

/* ==========================================================================
   5. MA'LUMOT BLOKLARI (INFO CARDS)
   ========================================================================== */
.info-card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 2px solid var(--gold-color); 
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: var(--theme-transition);
}

.info-card:hover {
    border-color: var(--gold-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.1);
}

/* ==========================================================================
   6. CONTACT (ALOQA BO'LIMI)
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
    width: 100%;
}

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 2px solid var(--gold-color); 
    padding: 35px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transition: var(--theme-transition);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: var(--theme-transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.submit-btn {
    padding: 14px;
    background: linear-gradient(45deg, var(--gold-color), #dc2626);
    border: none;
    color: var(--bg-color);
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--theme-transition), transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(251, 191, 36, 0.4);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--theme-transition), transform 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.social-item i {
    font-size: 1.5rem;
}

.social-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    border-color: var(--gold-color);
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.15);
    color: var(--text-color);
}

[data-theme="light"] .social-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.phone-home-box {
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: var(--phone-box-bg);
    border: 1px dashed var(--phone-box-border);
    border-radius: 15px;
    transition: var(--theme-transition);
}

.phone-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--theme-transition);
}

.phone-link:hover {
    color: var(--gold-color);
}

.home-btn {
    background: linear-gradient(45deg, var(--gold-color), #d97706);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--bg-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--theme-transition), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.home-btn:hover {
    transform: scale(1.25);
    box-shadow: 0 0 20px var(--gold-color), 0 0 35px #d97706;
}

/* ==========================================================================
   7. ANIMATSIYALAR KODLARI
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   8. RESPONSIVE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) {
    /* Mobile & Tablet view: logo left, toggle right, collapsible menu */
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-radius: 30px;
        padding: 10px 20px;
        width: 90%;
        max-width: none;
        left: 50%;
        transform: translateX(-50%);
    }

    .menu-toggle {
        display: flex; /* Show hamburger button on mobile/tablet */
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--header-border);
        border-radius: 20px;
        margin-top: 10px;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease, var(--theme-transition);
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    #bosh-qism {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 140px;
        padding-bottom: 40px;
    }

    .avatar-wrapper { 
        width: 250px; 
        height: 250px; 
    }

    .contact-container { 
        grid-template-columns: 1fr; 
    }

    .social-grid { 
        grid-template-columns: 1fr; 
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .info-card {
        padding: 24px;
        font-size: 1rem;
    }

    .contact-form {
        padding: 24px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    section {
        padding: 80px 15px 40px 15px;
    }
}

/* ==========================================================================
   9. TOAST BILDIRIShNOMALAR (PREMIUM TOASTS)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--header-border);
    color: var(--text-color);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), var(--theme-transition);
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}