* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563EB;
    --light-blue: #60A5FA;
    --dark-blue: #1E40AF;
    --accent: #F59E0B;
    --success: #10B981;
    --white: #FFFFFF;
    --gray-light: #F8FAFC;
    --gray-medium: #E2E8F0;
    --gray-dark: #475569;
    --text-dark: #0F172A;
    --text-gray: #64748B;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    --gradient-secondary: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --gradient-accent: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-cool: linear-gradient(135deg, #2563EB 0%, #1E3A8A 100%);
    --shadow-small: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.4);
    --shadow-neon: 0 0 20px rgba(37, 99, 235, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 50%, #e8f0fe 100%);
    position: relative;
}

/* Animated Background Shapes */
body::before {
    content: '';
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
    padding: 0.75rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo::before {
    content: "";
    background-image: url('images/cimer.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Enhanced Hero Section with Modern Design */
.hero {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.7) 0%, rgba(30, 64, 175, 0.65) 100%),
        url('images/epulet.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 120px 2rem 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Animated gradient overlay - Subtle version for better image visibility */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(37, 99, 235, 0.05) 25%,
        transparent 50%,
        rgba(245, 158, 11, 0.05) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating geometric shapes */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.3)"/></svg>'),
        url('data:image/svg+xml,<svg width="150" height="150" xmlns="http://www.w3.org/2000/svg"><rect x="70" y="70" width="10" height="10" fill="rgba(79,172,254,0.2)" transform="rotate(45 75 75)"/></svg>');
    background-size: 100px 100px, 150px 150px;
    background-position: 0 0, 50px 50px;
    animation: floatingShapes 30s linear infinite;
    z-index: 0;
}

@keyframes floatingShapes {
    0% { background-position: 0 0, 50px 50px; }
    100% { background-position: 100px 100px, 200px 200px; }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 50%, #bae6fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    animation: fadeInUp 1s ease 0.2s both, textGlow 3s ease-in-out infinite;
    letter-spacing: -0.02em;
}

@keyframes textGlow {
    0%, 100% { filter: drop-shadow(0 4px 12px rgba(79, 172, 254, 0.3)); }
    50% { filter: drop-shadow(0 4px 20px rgba(79, 172, 254, 0.6)); }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    animation: fadeInUp 1s ease 0.6s both;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 30px;
    padding: 3rem 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-stats::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.hero-stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    margin-top: 0.5rem;
}

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

/* Enhanced CTA Buttons */
.cta-button {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.8s both;
}

.cta-button::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 ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-large);
}

/* Enhanced Sections */
.section {
    padding: 100px 2rem;
    position: relative;
}

.section:nth-child(even) {
    background: var(--gray-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--primary-blue);
    font-weight: 700;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* Enhanced Cards with Bento Box Design */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 4rem;
    justify-content: center;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    text-align: center;
    flex: 0 1 350px;
}

.card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Gradient border effect */
.card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 32px;
    padding: 2px;
    background: linear-gradient(135deg, #2563EB, #F59E0B, #10B981, #2563EB);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card:hover::before {
    opacity: 1;
}

/* 3D Transform on hover */
.card:hover {
    transform: translateY(-20px) scale(1.02) rotateX(5deg);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.2),
        0 0 100px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.card p {
    color: var(--gray-dark);
    line-height: 1.7;
}

/* Animated Counter */
.counter {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

/* Enhanced Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 45%;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    left: 55%;
    transform: translateX(30px);
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0);
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px white, 0 0 0 8px var(--accent);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -60px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -60px;
}

.timeline-date {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Interactive Statistics with Modern Design */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2.5rem 2rem;
    border-radius: 28px;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    flex: 0 1 200px;
}

/* Animated gradient background */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, #2563EB, #10B981);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

/* Floating orb effect */
.stat-card::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    z-index: -1;
}

.stat-card:hover::before {
    opacity: 0.08;
}

.stat-card:hover::after {
    transform: translate(-50%, -50%) scale(2);
}

.stat-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 0 80px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(245, 158, 11, 0.5);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2563EB 0%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.stat-label {
    color: var(--gray-dark);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========================================
   KAPCSOLAT SZEKCIÓ - TELJES MEGOLDÁS
======================================== */

.contact-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e8f0fe 100%);
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.contact-section .section-title {
    color: var(--primary-blue);
}

/* Scroll Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    z-index: 100;
    box-shadow: var(--shadow-medium);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

/* Auto Scroll Button */
.auto-scroll-btn {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auto-scroll-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-large);
}

.auto-scroll-btn.active {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    animation: pulse 1.5s infinite;
}

.auto-scroll-btn .scroll-icon {
    font-size: 1.3rem;
    line-height: 1;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

@media (max-width: 768px) {
    .auto-scroll-btn {
        bottom: 90px;
        right: 20px;
    }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 15s infinite linear;
}

.floating-element:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-element:nth-child(2) { left: 20%; animation-delay: 2s; }
.floating-element:nth-child(3) { left: 30%; animation-delay: 4s; }
.floating-element:nth-child(4) { left: 40%; animation-delay: 6s; }
.floating-element:nth-child(5) { left: 50%; animation-delay: 8s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-medium);
        border-radius: 0 0 16px 16px;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: calc(100% - 80px);
        left: 60px !important;
        transform: translateX(-20px) !important;
    }

    .timeline-item.visible {
        transform: translateX(0) !important;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -80px;
        right: auto;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile image adjustments */
    .card-image {
        height: 150px !important;
    }

    .card-image-container .card-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
    }

    /* Hero background adjustment for mobile */
    .hero {
        background-attachment: scroll;
    }
}

/* Image container and styling */
.card-image-container {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.card-image-container .card-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card:hover .card-image {
    transform: scale(1.05);
}

.contact-item:hover .card-image {
    transform: scale(1.05);
}