/*
   Ortak responsive katmanı
   Bu dosya her sayfada en son yüklenir. Sayfaların içinde kalan eski
   kuralları tek bir mobil davranışta toplar.
*/

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
picture,
video,
iframe,
svg,
canvas {
    max-width: 100%;
}

img,
video,
canvas {
    height: auto;
}

input,
select,
textarea,
button {
    font: inherit;
}

.site-header {
    isolation: isolate;
}

.main-nav a,
.login-button,
.register-button,
.menu-toggle {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 980px) {
    .site-header {
        padding-inline: clamp(16px, 4vw, 32px) !important;
    }

    .main-nav {
        gap: clamp(12px, 2vw, 22px);
    }

    .main-nav a {
        font-size: 15px;
    }

    .site-footer {
        padding-inline: clamp(20px, 5vw, 48px);
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

/* Orta genişlikte uzun menü başlıkları üst satırı bozmasın. */
@media (min-width: 769px) and (max-width: 1280px) {
    .site-header {
        min-height: 68px !important;
        padding: 12px clamp(20px, 4vw, 42px) !important;
    }

    .brand-area {
        flex: 1 1 auto;
        min-width: 0;
    }

    .logo {
        white-space: nowrap;
        font-size: clamp(2.35rem, 4vw, 2.9rem) !important;
    }

    .menu-toggle {
        display: inline-flex !important;
        flex: 0 0 42px;
        width: 42px;
        min-height: 42px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .main-nav {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        right: 0;
        left: 0;
        width: 100% !important;
        max-height: calc(100vh - 68px);
        padding: 14px clamp(24px, 5vw, 56px) 20px !important;
        overflow-y: auto;
        background: var(--pudra-acik, #f5edf1) !important;
        border-top: 1px solid rgba(86, 59, 80, 0.12);
        box-shadow: 0 14px 22px rgba(33, 29, 35, 0.14);
        z-index: 200 !important;
    }

    .main-nav.active {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 2px !important;
    }

    .main-nav a {
        display: flex !important;
        align-items: center;
        min-height: 42px;
        padding: 9px 12px !important;
        border-radius: 8px;
        font-size: 1rem !important;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.65;
    }

    .site-header {
        min-height: 64px !important;
        padding: 11px 16px !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .brand-area {
        flex: 1 1 auto;
        min-width: 0;
    }

    .logo {
        display: block;
        overflow: hidden;
        font-size: clamp(1.55rem, 7vw, 2rem) !important;
        line-height: 1 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-actions,
    .auth-buttons {
        flex: 0 0 auto;
        gap: 5px !important;
    }

    .login-button,
    .register-button {
        min-height: 34px;
        padding: 7px 9px !important;
        border-radius: 7px !important;
        font-size: 0.72rem !important;
        line-height: 1;
        white-space: nowrap;
    }

    .menu-toggle {
        display: inline-flex !important;
        flex: 0 0 36px;
        width: 36px;
        min-height: 36px;
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: 1.55rem !important;
    }

    .main-nav {
        display: none;
        position: absolute !important;
        top: 100% !important;
        right: 0;
        left: 0;
        width: 100% !important;
        max-height: calc(100vh - 64px);
        padding: 10px 16px 16px !important;
        overflow-y: auto;
        background: var(--pudra-acik, #f5edf1) !important;
        border-top: 1px solid rgba(86, 59, 80, 0.12);
        box-shadow: 0 14px 22px rgba(33, 29, 35, 0.14);
        z-index: 200 !important;
    }

    .main-nav.active {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 2px !important;
    }

    .main-nav a {
        display: flex !important;
        align-items: center;
        min-height: 44px;
        padding: 10px 12px !important;
        border-radius: 8px;
        font-size: 1rem !important;
    }

    .main-nav a:active {
        background: rgba(197, 142, 170, 0.18);
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3.25rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.03em !important;
    }

    h2 {
        font-size: clamp(1.65rem, 7vw, 2.25rem) !important;
        line-height: 1.15 !important;
    }

    .hero,
    .hero-intro,
    .astro-hero,
    .numerology-hero,
    .weekly-hero,
    .personal-hero,
    .work-hero {
        padding-inline: 20px !important;
    }

    .content-box,
    .section-title,
    .article-container,
    .numerology-container,
    .astro-hero-inner,
    .numerology-hero-inner,
    .weekly-hero-inner,
    .personal-hero-inner,
    .work-hero-content {
        width: min(100% - 32px, 700px) !important;
        margin-inline: auto;
    }

    .number-grid,
    .zodiac-grid,
    .numbers-grid,
    .member-grid,
    .about-cards {
        grid-template-columns: 1fr !important;
    }

    .number-card,
    .zodiac-card,
    .mini-card,
    .member-card,
    .about-card,
    .numerology-card {
        min-width: 0;
    }

    .main-button,
    .outline-button,
    .whatsapp-button,
    .contact-submit {
        width: min(100%, 420px) !important;
        min-height: 46px;
    }

    .site-footer {
        gap: 14px;
        padding: 28px 20px !important;
    }

    .site-footer a {
        display: inline-block;
        margin: 4px 8px !important;
    }
}

/* Biyografi portresi, genel içerik görsel kuralından bağımsız kalır. */
.about-content .about-image img {
    width: min(210px, 100%) !important;
    max-width: 210px !important;
    height: 262px !important;
    margin: 0 auto 24px !important;
    object-fit: cover;
}

@media (max-width: 480px) {
    .about-content .about-image img {
        width: min(180px, 100%) !important;
        max-width: 180px !important;
        height: 225px !important;
    }
}

/* Ana sayfadaki iki keşif kartı masaüstünde her zaman yan yana kalır. */
@media (min-width: 769px) {
    .home-insights {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 420px) {
    .site-header {
        padding-inline: 12px !important;
    }

    .logo {
        font-size: clamp(1.5rem, 8vw, 1.85rem) !important;
    }

    .hero,
    .hero-intro,
    .astro-hero,
    .numerology-hero,
    .weekly-hero,
    .personal-hero,
    .work-hero {
        padding-inline: 16px !important;
    }
}

/* Tüm sayfalarda marka alanının ortak görünümü. */
.site-header .brand-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.site-header .logo {
    font-family: 'Italianno', cursive !important;
    font-size: clamp(2.2rem, 3.3vw, 2.75rem) !important;
    font-weight: 400 !important;
    line-height: 0.9 !important;
    letter-spacing: 0.5px !important;
}

.site-header .hero-label {
    display: block !important;
    margin: 0 !important;
    color: #7d566d !important;
    font-family: Arial, sans-serif !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: 1.15px !important;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .site-header .brand-area {
        gap: 2px;
    }

    .site-header .logo {
        font-size: clamp(1.8rem, 7vw, 2.15rem) !important;
    }

    .site-header .hero-label {
        font-size: 6.5px !important;
        letter-spacing: 0.75px !important;
    }

    /* Ana sayfadaki yönlendirme butonlarında metin ve ok aynı satırda kalır. */
    .home-insights .home-weekly-button,
    .home-insights .home-numerology-button,
    #gununMesajiCarki .gm-action,
    .contact-section .contact-submit {
        flex-wrap: nowrap !important;
        white-space: nowrap;
        font-size: clamp(0.7rem, 3.3vw, 0.875rem) !important;
        letter-spacing: 0 !important;
    }
}

/* Tek satırlık ortak üst menü: ekran genişlese de menü hamburger içinde kalır. */
.site-header {
    flex-wrap: nowrap !important;
    position: relative !important;
}

.site-header .menu-toggle {
    display: inline-flex !important;
    flex: 0 0 42px;
    width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.65rem !important;
    line-height: 1;
}

/* Hesap bağlantıları tüm genel sayfalarda ortak başlıkta kalır. */
.site-header .header-actions,
.site-header .auth-buttons {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.site-header .login-button,
.site-header .register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 8px;
    font-size: .78rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.site-header .login-button {
    color: #513d52;
    background: #fff;
    border: 1px solid #d9cbd5;
}

.site-header .register-button {
    color: #fff;
    background: #6b4b57;
    border: 1px solid #6b4b57;
}

.site-header .login-button[hidden],
.site-header .register-button[hidden] {
    display: none !important;
}

.site-header .main-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    right: 0;
    left: 0;
    width: 100% !important;
    max-height: calc(100vh - 64px);
    padding: 14px clamp(18px, 5vw, 56px) 20px !important;
    overflow-y: auto;
    background: var(--pudra-acik, #f5edf1) !important;
    border-top: 1px solid rgba(86, 59, 80, .12);
    box-shadow: 0 14px 22px rgba(33, 29, 35, .14);
    z-index: 200 !important;
}

.site-header .main-nav.active {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px !important;
}

.site-header .main-nav a {
    display: flex !important;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px !important;
    border-radius: 8px;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .site-header .brand-area {
        flex: 1 1 auto;
        min-width: 0;
    }
}
