/* Modern Base styles */
:root {
    --primary: #D4AF37;
    --primary-hover: #C49F2F;
    --primary-dark: #B8941F;
    --secondary: #101922;
    --accent: #3B82F6;
    --text: #1a202c;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --bg: #ffffff;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    --glass: rgba(255, 255, 255, 0.8);
    --backdrop-blur: blur(12px);
}

.dark {
    --primary: #F59E0B;
    --primary-hover: #FBBF24;
    --primary-dark: #D97706;
    --secondary: #F8FAFC;
    --accent: #60A5FA;
    --text: #F8FAFC;
    --text-light: #CBD5E0;
    --text-muted: #94A3B8;
    --bg: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --border: #334155;
    --border-light: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    --glass: rgba(15, 23, 42, 0.8);
    --backdrop-blur: blur(12px);
}

/* Smooth transitions for all elements */
* {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* Article / Bilgi Bankası typography */
.article-layout {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--shadow-sm);
}

.article-content {
    display: grid;
    gap: 1.5rem;
    color: var(--text);
    font-family: 'Manrope', 'Inter', sans-serif;
    line-height: 1.75;
}

.article-content .article-title {
    font-size: clamp(2.75rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--secondary);
}

.article-content .article-subtitle {
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    color: var(--text-light);
}

.article-content h2 {
    font-size: clamp(1.75rem, 3.6vw, 2.25rem);
    font-weight: 700;
    color: var(--primary);
    margin-top: clamp(2rem, 4vw, 3rem);
    position: relative;
    padding-left: 1.25rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    inset-block: 0.35rem;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--gradient-primary);
}

.article-content h3 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    color: var(--secondary);
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.article-content p,
.article-content li {
    font-size: 1.05rem;
    color: var(--text-light);
}

.article-content ul,
.article-content ol {
    display: grid;
    gap: 0.65rem;
    padding-left: 1.5rem;
    margin-block: 0.5rem 1.5rem;
}

.article-content ul li::marker,
.article-content ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    color: var(--secondary);
    font-style: italic;
}

.article-content a {
    color: var(--primary);
    font-weight: 600;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: var(--primary-hover);
}

.article-content strong {
    color: var(--secondary);
    font-weight: 700;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-content table th,
.article-content table td {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    text-align: left;
}

.article-content table thead {
    background: var(--bg-secondary);
    color: var(--secondary);
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

.article-card > * {
    margin: 0 !important;
}

.article-card > * + * {
    margin-top: 0 !important;
}

.article-card > a {
    margin-top: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.article-card > a:hover {
    color: var(--primary-hover);
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.35rem 0.75rem 0.35rem 0.25rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.article-back-link:hover {
    background: rgba(212, 175, 55, 0.16);
    transform: translateX(-2px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .article-layout {
        padding: 1.75rem;
    }

    .article-content {
        gap: 1.25rem;
    }
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Header styles */
header {
    background: var(--glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.dark header {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: var(--border);
}

/* Logo hover effects */
.header-brand {
    transition: transform 0.3s ease;
}

.header-brand:hover {
    transform: scale(1.02);
}

/* Force fixed header when using class="fixed" */
header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

/* Prevent content from sliding under fixed header */
body.has-fixed-header {
    padding-top: 80px; /* match visual height of header */
}

/* Modern Navigation */
.nav-link {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--bg-tertiary);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Modern Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Modern Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-glass {
    background: var(--glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .card-glass {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modern Form elements */
input, textarea, select {
    background: var(--bg);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    transform: translateY(-1px);
}

input:hover, textarea:hover, select:hover {
    border-color: var(--primary);
}

/* Floating label effect */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg);
    padding: 0 0.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus + .form-label,
.form-group input:not(:placeholder-shown) + .form-label {
    top: 0;
    font-size: 0.875rem;
    color: var(--primary);
}

/* Advanced Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Enhanced Responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-menu {
        position: fixed;
        top: 5rem;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        color: var(--text);
        box-shadow: var(--shadow-lg);
        z-index: 50;
        border-bottom: 1px solid var(--border-light);
    }

    .dark .mobile-menu {
        background-color: rgba(15, 23, 42, 0.98);
        border-bottom-color: var(--border);
    }
    
    .nav-link {
        padding: 1rem;
        border-radius: 0.5rem;
        margin: 0.25rem 0;
    }
    
    h1 { font-size: clamp(2rem, 8vw, 3rem); }
    h2 { font-size: clamp(1.5rem, 6vw, 2.5rem); }
    
    .btn-primary {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* Windows font rendering helper: prevent clipping for large gradient headings */
.heading-hack { padding-bottom: 0.15em; line-height: 1.25; display: inline-block; }

@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    input, textarea, select {
        padding: 0.75rem;
    }
}

/* Modern dark mode toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Enhanced WhatsApp button */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: none;
    cursor: pointer;
}

.whatsapp-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #25D366, #20BA5A, #25D366);
    z-index: -1;
    animation: rotate 3s linear infinite;
}

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

.whatsapp-button:hover::before {
    animation-duration: 1s;
}

/* Modern utility classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Compact card variant for dense country lists */
.card-compact { padding: 0.75rem; }
.card-compact .text-lg { font-size: 0.95rem; line-height: 1.35rem; }
.card-compact .text-sm { font-size: 0.75rem; line-height: 1.1rem; }
/* shrink flag and arrow sizes within compact cards */
.card-compact .fi { font-size: 1.25rem; }
.card-compact svg { width: 0.875rem; height: 0.875rem; }

/* Corporate icon badges (monochrome brand style) */
.icon-badge {
    background: var(--bg-tertiary);
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.step-badge {
    background: var(--bg-tertiary);
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.glass-effect {
    background: var(--glass);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    /* Ensure gradient text renders correctly across browsers (Windows/Edge/Chrome) */
    color: transparent; /* Firefox and general fallback */
    -webkit-text-fill-color: transparent; /* WebKit */
    display: inline-block; /* Prevent descender clipping (g, y, p) */
    line-height: 1.25; /* Taller line box to avoid cutting descenders */
    padding-bottom: 0.12em; /* Extra room for g/ğ dips */
}

/* Footer styles */
.site-footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 60%);
    position: relative;
}

.dark .site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #0b1221 60%);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.4;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 15px var(--primary);
    }
    to {
        box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus, a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .whatsapp-button,
    .theme-toggle,
    .mobile-menu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
