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

:root {
    --primary-blue: #0a2442;
    --light-blue: #14599b;
    --dark-blue: #071b32;
    --accent: #ffc247;
    --success: #0f8a6c;
    --success-soft: rgba(15, 138, 108, 0.1);
    --white: #FFFFFF;
    --gray-light: #f4f7fb;
    --gray-medium: rgba(10, 36, 66, 0.12);
    --gray-dark: #4b6177;
    --text-dark: #0a2442;
    --text-gray: #5b6f84;
    --accent-soft: rgba(20, 89, 155, 0.1);
    --gold-soft: rgba(255, 194, 71, 0.16);
    --gradient-primary: linear-gradient(135deg, #0a2442 0%, #071b32 100%);
    --gradient-secondary: linear-gradient(135deg, #ffc247 0%, #e89a16 100%);
    --gradient-accent: linear-gradient(135deg, #14599b 0%, #087a9f 100%);
    --gradient-warm: linear-gradient(135deg, #ffc247 0%, #e89a16 100%);
    --gradient-cool: linear-gradient(135deg, #14599b 0%, #071b32 100%);
    --shadow-small: 0 2px 8px rgba(7, 27, 50, 0.06);
    --shadow-medium: 0 18px 50px -34px rgba(7, 27, 50, 0.3), 0 2px 8px rgba(7, 27, 50, 0.05);
    --shadow-large: 0 24px 70px -34px rgba(7, 27, 50, 0.4), 0 2px 8px rgba(7, 27, 50, 0.06);
    --shadow-glow: 0 0 40px rgba(20, 89, 155, 0.3);
    --shadow-neon: 0 0 24px rgba(255, 194, 71, 0.45);
    --font-display: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--gray-light);
    position: relative;
}

/* Subtle static background wash (calmer, matches the site's flat surfaces) */
body::before {
    content: '';
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(20, 89, 155, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 194, 71, 0.07) 0%, transparent 45%);
    z-index: -1;
    pointer-events: none;
}

/* 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, 194, 71, 0.3);
    border-top: 4px solid var(--accent);
    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(244, 247, 251, 0.88);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--gray-medium);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-small);
    padding: 0.65rem 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-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: transform 0.3s ease;
}

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

.logo::before {
    content: "";
    background-image: url('https://babits.hu/?babits_felveteli_2027=1&asset=images/cimer.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 32px;
    height: 32px;
    margin-right: 0.6rem;
    display: inline-block;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 650;
    font-size: 0.92rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(7, 27, 50, 0.08);
    transform: translateY(-1px);
}

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

/* Hero Section */
.hero {
    background:
        radial-gradient(circle at 15% 15%, rgba(20, 89, 155, 0.35), transparent 32%),
        radial-gradient(circle at 85% 80%, rgba(255, 194, 71, 0.16), transparent 30%),
        linear-gradient(135deg, #06192e 0%, #0a2d50 55%, #0c4165 100%);
    color: white;
    padding: 120px 2rem 100px;
    text-align: left;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Subtle grid overlay, echoes the main site's hero pattern */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 30% 20%, #000, transparent 70%);
}

/* Floating decorative dots */
.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,194,71,0.35)"/></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(20,89,155,0.25)" transform="rotate(45 75 75)"/></svg>');
    background-size: 100px 100px, 150px 150px;
    background-position: 0 0, 50px 50px;
    animation: floatingShapes 40s 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: 1240px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero-copy {
    flex: 1 1 520px;
}

.hero-media {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
}

.hero-eyebrow {
    display: inline-flex;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 194, 71, 0.34);
    border-radius: 999px;
    background: rgba(255, 194, 71, 0.08);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 0.9s ease 0.1s both;
}

.hero-photo {
    position: relative;
    width: min(480px, 100%);
    aspect-ratio: 16 / 11;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 46px 90px -35px rgba(0, 0, 0, 0.75);
    transform: rotate(-1.5deg);
    animation: fadeInUp 0.9s ease 0.3s both;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-year-badge {
    position: absolute;
    right: 16px;
    top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(7, 27, 50, 0.72);
    backdrop-filter: blur(10px);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
}

.hero-year-badge i {
    width: 16px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.05;
    animation: fadeInUp 0.9s ease 0.2s both;
}

.hero h1 .accent-word {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #cbd8e6;
    animation: fadeInUp 0.9s ease 0.35s both;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem 2.25rem;
    margin: 2.5rem 0;
    animation: fadeInUp 0.9s ease 0.5s both;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 24px;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-large);
    position: relative;
    overflow: hidden;
}

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

.hero-stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.9rem, 4vw, 3.5rem);
    font-weight: 800;
    color: var(--accent);
}

.hero-stat-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #cbd8e6;
    margin-top: 0.4rem;
}

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

/* CTA Buttons — pill shape, matching the main site's gold / accent buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--dark-blue);
    padding: 0 2rem;
    height: 52px;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 750;
    font-size: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 15px 34px -18px rgba(255, 194, 71, 0.85);
    animation: fadeInUp 0.9s ease 0.7s both;
}

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

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

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

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

.section-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    margin-bottom: 4rem;
    color: var(--primary-blue);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s ease;
}

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

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

/* Cards */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    margin-top: 4rem;
    justify-content: center;
}

.card {
    background: var(--white);
    border-radius: 22px;
    padding: 2.25rem;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--gray-medium);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    text-align: center;
    flex: 0 1 350px;
}

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

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: rgba(20, 89, 155, 0.25);
}

.card-icon {
    font-size: 2.1rem;
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--accent-soft);
}

.card h3 {
    font-family: var(--font-display);
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: clamp(1.35rem, 1.7vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--gray-dark);
    font-size: 1.08rem;
    line-height: 1.62;
}

/* Animated Counter: styling comes from the paired .hero-stat-number / .stat-number class */

/* 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: 2px;
    background: var(--gray-medium);
    transform: translateX(-50%);
}

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

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

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

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

.timeline-content {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 18px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--gray-medium);
    position: relative;
}

.timeline-content h3 {
    font-family: var(--font-display);
    color: var(--primary-blue);
    font-size: 1.05rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px var(--white), 0 0 0 7px rgba(255, 194, 71, 0.4);
}

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

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

.timeline-date {
    background: var(--gradient-accent);
    color: white;
    font-family: var(--font-display);
    padding: 0.5rem 1.15rem;
    border-radius: 999px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* Stat cards */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
    justify-content: center;
}

.stat-card {
    background: var(--white);
    padding: 1.6rem 1.15rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--gray-medium);
    position: relative;
    overflow: hidden;
    flex: 0 1 200px;
    min-height: 165px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-large);
    border-color: rgba(20, 89, 155, 0.25);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.65rem, 3.4vw, 3.2rem);
    font-weight: 800;
    color: var(--light-blue);
    display: block;
    line-height: 1.16;
    margin-bottom: 0.55rem;
}

.stat-label {
    color: var(--gray-dark);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Wrapped stat cards are flex rows so the final row remains centered. */
.university-stats {
    max-width: 760px;
    margin: 0 auto 2rem;
}
.university-stats .stat-card { flex-basis: 225px; }
.university-stats .stat-number {
    font-size: clamp(2.35rem, 3vw, 2.85rem);
    margin-top: 0.35rem;
    margin-bottom: 0;
}
.applicant-stats,
.student-rating-stats {
    max-width: 1000px;
    margin: 0 auto 2rem;
}
.applicant-stats .stat-card {
    flex-basis: 148px;
    min-height: 175px;
    padding: 1.25rem 0.65rem;
}
.applicant-stats .stat-number {
    font-size: clamp(1.9rem, 2.4vw, 2.3rem);
    margin-top: 0.7rem;
    margin-bottom: 0;
    white-space: nowrap;
}
.student-rating-stats .stat-card { flex-basis: 180px; }
.student-rating-stats .stat-number {
    font-size: clamp(2.45rem, 3vw, 2.9rem);
}

/* Contact section */
.contact-section {
    background: var(--gray-light);
    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(--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: var(--gradient-accent);
    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: var(--gradient-warm);
    color: var(--dark-blue);
    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(255, 194, 71, 0.6);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 194, 71, 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.12;
    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 */
/* Hero: stack the copy above the photo once they no longer fit side by side */
@media (max-width: 980px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-media {
        order: -1;
        margin-bottom: 1.5rem;
    }

    .hero-photo {
        width: min(420px, 90%);
    }
}

@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-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }

    .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: -46px;
        right: auto;
    }

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

    /* Requirement comparison grids: 3 columns never fit a phone */
    .req-grid-3 {
        grid-template-columns: 1fr !important;
    }

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

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

/* Requirement comparison grids: 2 columns get tight on phones */
@media (max-width: 560px) {
    .req-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* 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.92);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-small);
}

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

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

/* The standalone presentation retains its navigation; only the WP embed hides it. */
.embedded #navbar { display: none !important; }
.embedded .hero {
    min-height: min(100vh, 850px);
    padding-top: 64px;
    padding-bottom: 72px;
}
