/**
 * TYPOGRAPHY.CSS
 * Global Typography System - Frontend
 * Tüm tipografi ayarları bu dosyada merkezi olarak yönetilir
 */

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   TYPOGRAPHY CSS VARIABLES
   ============================================ */
:root {
    /* Font Families — Tema Oluşturucu override’ları :root inline ile gelir */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-nav: var(--font-family-base);
    --font-family-button: var(--font-family-base);
    --font-family-price: var(--font-family-heading);
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;

    /* Role weights — Tema Oluşturucu override’ları :root inline ile gelir */
    --font-weight-body: 400;
    --font-weight-heading: 700;
    --font-weight-nav: 500;
    --font-weight-button: 600;
    --font-weight-price: 700;
    
    /* Font Sizes - Desktop */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Line Heights */
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    
    /* Letter Spacing */
    --letter-spacing-tighter: -0.05em;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
}

/* ============================================
   RESPONSIVE FONT SIZES
   ============================================ */

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --font-size-xs: 0.6875rem;    /* 11px */
        --font-size-sm: 0.8125rem;    /* 13px */
        --font-size-base: 0.9375rem;  /* 15px */
        --font-size-lg: 1rem;         /* 16px */
        --font-size-xl: 1.125rem;     /* 18px */
        --font-size-2xl: 1.25rem;     /* 20px */
        --font-size-3xl: 1.5rem;      /* 24px */
        --font-size-4xl: 1.875rem;    /* 30px */
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --font-size-xs: 0.75rem;      /* 12px */
        --font-size-sm: 0.875rem;     /* 14px */
        --font-size-base: 1rem;       /* 16px */
        --font-size-lg: 1.125rem;     /* 18px */
        --font-size-xl: 1.25rem;      /* 20px */
        --font-size-2xl: 1.5rem;      /* 24px */
        --font-size-3xl: 1.875rem;    /* 30px */
        --font-size-4xl: 2.25rem;     /* 36px */
    }
}

/* Desktop (min-width: 769px) - Default values already set above */

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Mobile base font size adjustment */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-body, var(--font-weight-normal));
    line-height: var(--line-height-normal);
    color: var(--color-text, #1f2937);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADINGS
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heading, var(--font-weight-bold));
    line-height: var(--line-height-tight);
    color: var(--color-text, #1f2937);
    margin-bottom: var(--space-4, 1rem);
}

/* Gradient page headers: keep title/subtitle readable on brand background */
.page-header .page-header__title,
.page-header .page-header__subtitle {
    color: #fff;
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-heading, var(--font-weight-bold));
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-heading, var(--font-weight-bold));
    line-height: var(--line-height-tight);
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-heading, var(--font-weight-bold));
    line-height: var(--line-height-tight);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-heading, var(--font-weight-semibold));
    line-height: var(--line-height-tight);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-heading, var(--font-weight-semibold));
    line-height: var(--line-height-tight);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-heading, var(--font-weight-semibold));
    line-height: var(--line-height-tight);
}

/* ============================================
   PARAGRAPHS & TEXT
   ============================================ */
p {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-body, var(--font-weight-normal));
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: var(--space-4, 1rem);
}

p:last-child {
    margin-bottom: 0;
}

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

.text-3xl {
    font-size: var(--font-size-3xl);
}

.text-4xl {
    font-size: var(--font-size-4xl);
}

/* Font Weight Utilities */
.font-light {
    font-weight: var(--font-weight-light);
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-extrabold {
    font-weight: var(--font-weight-extrabold);
}

.font-black {
    font-weight: var(--font-weight-black);
}

/* ============================================
   ROLE-BASED FONT APPLICATION
   (Tema Oluşturucu: gövde / başlık / menü / buton / fiyat)
   ============================================ */
.main-nav,
.main-nav a,
.main-nav .menu-link,
.main-nav .menu-dropdown-link,
.main-nav .menu-megamenu-link,
.main-nav .menu-megamenu-col-title,
.header--portal,
.header--portal .portal-nav,
.header--portal .portal-nav a,
.header--portal .portal-menu,
.header--portal .portal-link,
.site-header .main-nav,
.mobile-nav,
.mobile-nav a,
.footer-nav,
.footer-nav a {
    font-family: var(--font-family-nav);
    font-weight: var(--font-weight-nav, var(--font-weight-medium));
}

.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-sm,
.btn-lg,
.btn-link,
.btn-header-cta,
.btn-online-payment,
.btn-login,
.btn-register,
.tour-card-cta,
.hero-showcase-cta,
.hero-fb-cta,
.home-search-widget__submit-btn-icon,
.home-search-widget--pill button[type="submit"],
button.btn,
a.btn,
.auth-buttons .btn-primary,
.auth-buttons .btn-link {
    font-family: var(--font-family-button);
    font-weight: var(--font-weight-button, 600);
}

.tour-card-listing__price-box,
.tour-card-listing__price-old,
.tour-card-listing__price-current,
.tour-card-listing__price-hint,
.tour-card-listing__price-b2b,
.tour-card-overlay-price,
.tour-card-price,
.hotel-card__price,
.hotel-card__price-label,
.hotel-card__price-value,
.price,
.price-current,
.price-old,
.product-price,
.tour-price {
    font-family: var(--font-family-price);
    font-weight: var(--font-weight-price, var(--font-weight-bold));
}

input,
textarea,
select,
button,
.form-control,
label {
    font-family: inherit;
}

/* Line Height Utilities */
.leading-none {
    line-height: var(--line-height-none);
}

.leading-tight {
    line-height: var(--line-height-tight);
}

.leading-snug {
    line-height: var(--line-height-snug);
}

.leading-normal {
    line-height: var(--line-height-normal);
}

.leading-relaxed {
    line-height: var(--line-height-relaxed);
}

.leading-loose {
    line-height: var(--line-height-loose);
}

/* ============================================
   LEGACY COMPATIBILITY
   ============================================ */
/* Eski değişken isimleri için alias'lar */
:root {
    --font-sans: var(--font-family-base);
    --text-xs: var(--font-size-xs);
    --text-sm: var(--font-size-sm);
    --text-base: var(--font-size-base);
    --text-lg: var(--font-size-lg);
    --text-xl: var(--font-size-xl);
    --text-2xl: var(--font-size-2xl);
    --text-3xl: var(--font-size-3xl);
    --text-4xl: var(--font-size-4xl);
    --font-normal: var(--font-weight-normal);
    --font-medium: var(--font-weight-medium);
    --font-semibold: var(--font-weight-semibold);
    --font-bold: var(--font-weight-bold);
}

