/* Inbox Marketing KFT - Custom Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Properties (CSS Variables) */
:root {
    /* Colors - Maximum 3 colors as specified */
    --primary: #2563eb;
    --secondary: #059669;
    --accent: #dc2626;
    
    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography - Maximum 2 fonts as specified */
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-roboto: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing - 8pt Grid System */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;
    --space-12: 96px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* Breakpoints */
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
}

/* Body and Base Typography */
body {
    font-family: var(--font-inter);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-inter);
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

@media (min-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8; /* Darker blue */
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px; /* Touch target minimum */
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #047857;
    color: white;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: #b91c1c;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Card Component */
.card {
    background-color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-lg {
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
}

/* Form Components */
.form-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-inter);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px; /* Touch target minimum */
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-1);
}

.form-select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background-color: white;
    font-size: 1rem;
    font-family: var(--font-inter);
    cursor: pointer;
    min-height: 44px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-inter);
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Image Components */
.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.img-cover {
    object-fit: cover;
    width: 100%;
}

/* Logo Styles */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-4);
    align-items: center;
}

.logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    height: 60px;
}

.logo-item:hover {
    opacity: 1;
}

.logo-item img {
    max-height: 40px;
    max-width: 100%;
    height: auto;
    width: auto;
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    font-weight: 500;
    padding: var(--space-1) var(--space-2);
    transition: color 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

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

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

@media (max-width: 767px) {
    .mobile-nav {
        display: block;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: white;
        border-top: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        z-index: 40;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.focus-visible:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-left: var(--space-1);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #047857 100%);
}

/* Text Selection */
::selection {
    background-color: var(--primary);
    color: white;
}

/* Hungarian Language Specific Adjustments */
html[lang="hu"] {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Print Styles */
@media print {
    * {
        color-adjust: exact;
    }
    
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000ff;
        --secondary: #008000;
        --accent: #ff0000;
    }
    
    .card {
        border: 1px solid var(--gray-400);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Preparation (for future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here if needed in the future */
    /* Currently not required based on specifications */
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Container Queries (future-proofing) */
@supports (container-type: inline-size) {
    .container {
        container-type: inline-size;
    }
}

/* 44px Touch Targets for Mobile */
@media (max-width: 767px) {
    button,
    .btn,
    a[role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: var(--space-2) var(--space-3);
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* 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;
}

.text-balance {
    text-wrap: balance;
}

.aspect-ratio-16-9 {
    aspect-ratio: 16/9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4/3;
}

.aspect-ratio-square {
    aspect-ratio: 1/1;
}