:root {
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.4);
    --secondary: #6366f1;
    --accent: #a855f7;
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10001;
    transition: top 0.3s;
    border-bottom-right-radius: 8px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--accent);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Glassmorphism Classes */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 2rem;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(15px);
}

.logo {
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    cursor: default;
    /* Tighter line height between logo and text */
}

.logo img {
    height: 90px;
    width: auto;
    transition: var(--transition);
}

.logo-text {
    font-family: var(--font-heading);
    /* Matching brand style */
    font-size: 0.95rem;
    /* Exact match to .nav-links a */
    font-weight: 500;
    color: var(--text-main);
    margin-top: 5px;
    text-transform: uppercase;
    /* Assuming the design might want this, or Normal case */
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .logo img {
        height: 50px;
    }

    .logo-text {
        font-size: 0.8rem;
    }
}


.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .menu-toggle {
        display: block;
        padding: 0.5rem;
    }

    .menu-toggle i {
        width: 28px;
        height: 28px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-dark);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1099;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/office.png') center/cover no-repeat;
    opacity: 0.2;
    z-index: -1;
}

.hero-content {
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.hero-title span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.2s forwards;
}

.course-spotlight-shell {
    margin: -8rem auto 1rem;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.course-spotlight-grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 420px));
    justify-content: center;
    gap: 1.25rem;
}

.course-spotlight-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-color: rgba(14, 165, 233, 0.16);
    background:
        linear-gradient(160deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.05)),
        rgba(8, 15, 28, 0.88);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.26);
}

.course-spotlight-card-square {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 0;
    gap: 0;
}

.course-spotlight-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.course-spotlight-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.14);
    color: var(--primary);
}

.course-spotlight-icon i {
    width: 30px;
    height: 30px;
}

.course-spotlight-icon-security {
    background: rgba(99, 102, 241, 0.16);
    color: #a5b4fc;
}

.course-spotlight-kicker {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.course-spotlight-copy h2 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    margin-bottom: 0.85rem;
    line-height: 1.15;
}

.course-spotlight-copy h3 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    margin-bottom: 0.65rem;
    line-height: 1.15;
}

.course-spotlight-copy p:last-child {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.course-spotlight-card-square .course-spotlight-copy {
    padding: 1rem 1rem 0;
}

.course-spotlight-card-square .btn {
    margin: auto 1rem 1rem;
    width: calc(100% - 2rem);
    text-align: center;
}

.course-highlight {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    gap: 2rem;
    padding: 2.4rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(6, 182, 212, 0.04)),
        rgba(8, 15, 28, 0.82);
}

.course-highlight-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.course-highlight-copy h2,
.course-highlight-copy h3 {
    font-family: 'Outfit', sans-serif;
}

.course-highlight-copy h2 {
    margin-bottom: 1.1rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.15;
    max-width: 14ch;
}

.course-highlight-copy h3 {
    margin: 2rem 0 0.85rem;
    color: var(--text-light);
    font-size: 1.25rem;
    line-height: 1.35;
}

.course-highlight-copy p {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 1.1rem;
    font-size: 1.03rem;
    max-width: 68ch;
}

.course-highlight-points {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    display: grid;
    gap: 0.9rem;
}

.course-highlight-points li {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    line-height: 1.7;
}

.course-video-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-content: start;
}

.course-video-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.45rem;
    border-radius: 20px;
    background: rgba(7, 15, 25, 0.65);
    border: 1px solid rgba(14, 165, 233, 0.14);
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.course-video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.course-video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

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

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--primary-glow);
}

/* Section Styling */
section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Footer */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.trust-section {
    padding: 6rem 2rem;
}

.trust-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.trust-card {
    padding: 2rem;
}

.trust-card h3 {
    margin-bottom: 1rem;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trust-list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

.trust-meta {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 5rem 1.5rem;
    }

    .hero {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .service-card {
        padding: 2rem;
    }

    .course-spotlight-shell {
        margin-top: -2rem;
        padding: 0 1rem;
    }

    .course-spotlight-grid {
        grid-template-columns: 1fr;
    }

    .course-spotlight-card {
        padding: 1.4rem;
    }

    .course-spotlight-card-square {
        aspect-ratio: auto;
        padding: 0;
    }

    .course-spotlight-card-square .btn {
        margin: 1.25rem 1rem 1rem;
        width: calc(100% - 2rem);
    }

    .course-spotlight-card-square .course-spotlight-copy {
        padding: 1rem 1rem 0;
    }

    .course-highlight {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .course-highlight-copy h2 {
        max-width: none;
    }

    .course-video-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* About Page Mobile */
    .about-hero {
        grid-template-columns: 1fr;
        padding-top: 7rem;
        gap: 3rem;
        text-align: center;
    }

    .about-text h1 {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-img-placeholder {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Services Page Mobile */
    .service-detail {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        margin-bottom: 4rem;
        direction: ltr !important;
    }

    .service-detail .detail-text {
        direction: ltr !important;
    }

    .detail-img {
        height: 300px;
    }

    .detail-text h3 {
        font-size: 1.8rem;
    }

    /* Publications Mobile Fixes */
    .publications-grid {
        gap: 3rem;
    }

    .book-detail {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .book-cover {
        max-width: 250px;
        margin: 0 auto;
    }

    .book-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .book-info h2 {
        font-size: 1.8rem;
    }

    /* Contact Page Mobile */
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 3rem;
        padding-top: 7rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Styles for Applications Page --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

@media (max-width: 1200px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.page-header {
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.page-header-copy {
    flex: 1 1 auto;
    text-align: left;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.page-header-logo {
    width: clamp(5.5rem, 14vw, 8.5rem);
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.app-card {
    padding: 0;
    /* Remove default padding, handle inside */
    overflow: hidden;
    /* For image corners */
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.app-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.app-expand-hint {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-main);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.app-expand-hint i {
    width: 14px;
    height: 14px;
}

body.app-card-open {
    overflow: hidden;
}

body.app-card-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(18px);
    z-index: 1198;
}

.app-card.is-fullscreen {
    position: fixed;
    inset: 2.2rem;
    z-index: 1199;
    margin: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: calc(100vh - 4.4rem);
    overflow: auto;
    transform: none !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    border-color: rgba(99, 102, 241, 0.5);
}

.app-card.is-fullscreen .app-grid-layout {
    min-height: 100%;
}

.app-card.is-fullscreen .app-image-container {
    min-height: 320px;
}

.app-card-close {
    position: sticky;
    top: 1rem;
    margin-left: auto;
    margin-right: 1rem;
    margin-top: 1rem;
    z-index: 4;
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(3, 7, 18, 0.9);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.app-card-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.app-card.is-fullscreen .app-card-close {
    display: inline-flex;
}

.app-card.is-fullscreen .app-expand-hint {
    display: none;
}

.app-card.is-fullscreen .app-text-content {
    padding: 1.6rem;
    gap: 1rem;
}

.app-card.is-fullscreen .app-header h2 {
    font-size: 1.6rem;
}

.app-card.is-fullscreen .app-description {
    font-size: 0.98rem;
    line-height: 1.65;
}

.app-card.is-fullscreen .badge {
    font-size: 0.78rem;
    padding: 0.45rem 0.8rem;
}

.app-card.is-fullscreen .badge i {
    width: 15px;
    height: 15px;
}

.app-card.is-fullscreen .app-features li {
    font-size: 0.92rem;
    line-height: 1.6;
}

.app-card.is-fullscreen .app-actions .btn {
    width: auto;
    min-width: 240px;
}

.app-grid-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-image-container {
    position: relative;
    overflow: hidden;
    background-color: #0f172a;
    /* Fallback color */
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    min-height: 140px;
    height: auto;
    width: 100%;
    padding: 10px;
}

.app-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.7s ease;
}

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

.app-image-container img {
    max-width: 100%;
    max-height: 100%;
}

.app-text-content {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
    justify-content: space-between;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.app-header .icon-box {
    background: rgba(14, 165, 233, 0.1);
    padding: 5px;
    border-radius: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-header h2 {
    font-size: 1rem;
    color: var(--text-main);
    margin: 0;
}

.app-description {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.app-description strong {
    color: var(--text-main);
}

.app-description em {
    color: var(--secondary);
    font-style: normal;
    font-weight: 600;
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 99px;
    font-size: 0.55rem;
    color: var(--text-main);
    font-weight: 500;
}

.badge i {
    width: 12px;
    height: 12px;
    color: var(--primary);
}

.app-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-features li {
    font-size: 0.62rem;
    line-height: 1.35;
    padding-left: 1rem;
    position: relative;
    color: var(--text-muted);
}

.app-features li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 1;
    top: 1px;
}

.app-features li strong {
    color: var(--text-main);
}

/* Responsiveness for App Card */
@media (max-width: 900px) {
    .app-grid-layout {
        grid-template-columns: 1fr;
    }

    .app-image-container {
        min-height: 180px;
    }

    .app-text-content {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .page-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .page-header-copy {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .app-card.is-fullscreen {
        inset: 0.8rem;
        max-height: calc(100vh - 1.6rem);
    }

    .app-card.is-fullscreen .app-image-container {
        min-height: 220px;
    }

    .app-card.is-fullscreen .app-text-content {
        padding: 1rem;
    }

    .app-card.is-fullscreen .app-header h2 {
        font-size: 1.25rem;
    }

    .app-card.is-fullscreen .app-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* --- Contact Page Styles --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    padding-top: 10rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

.contact-form {
    padding: 3rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 7rem;
    }
}

/* --- Publications Page Styles --- */
.publications-section {
    margin-top: 6rem;
}

.publications-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

.book-detail {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: center;
}

.book-cover {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.book-detail:hover .book-cover {
    transform: translateY(-10px) rotate(-2deg);
}

.book-info h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.book-info h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.book-meta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.book-link {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 968px) {
    .book-detail {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .book-cover {
        max-width: 300px;
        margin: 0 auto;
    }

    .book-meta {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* --- About (Chi Sono) Page Styles --- */
.about-hero {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
    padding: 10rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-container {
    position: relative;
}

.profile-img-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background: url('assets/profile_professional.png') center/cover no-repeat;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid var(--glass-border);
}

.about-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.about-details {
    padding-top: 2rem;
}



.section-title {
    margin-top: 5rem;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.timeline {
    margin: 4rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
    border-left: 2px solid var(--glass-border);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content h5 {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    color: var(--text-muted);
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 10px;
}

.timeline-content ul li::before {
    content: '•';
    color: var(--primary);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.book-card {
    padding: 2rem;
}

.book-card h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.skills-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 968px) {
    .about-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 8rem;
    }

    .profile-img-placeholder {
        max-width: 300px;
        margin: 0 auto;
    }

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

/* --- Services Page Styles --- */
.services-section {
    margin-top: 6rem;
}

.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) .detail-text {
    direction: ltr;
}

.detail-img {
    width: 100%;
    height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-detail:hover .detail-img img {
    transform: scale(1.05);
}

.detail-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.detail-list {
    list-style: none;
    margin-top: 1.5rem;
}

.detail-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-list i {
    color: var(--primary);
    width: 18px;
}

@media (max-width: 968px) {
    .service-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Privacy Page Styles --- */
.privacy-content {
    max-width: 900px !important;
    margin-bottom: 5rem;
}

.privacy-section {
    padding: 3rem;
    margin-bottom: 2rem;
}

.privacy-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.privacy-section h3 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.privacy-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.privacy-section ul {
    list-style: none;
    margin-left: 1rem;
    color: var(--text-muted);
}

.privacy-section ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.privacy-section ul li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(3, 7, 18, 0.95);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    z-index: 9999;
    display: none;
    /* Hidden by default, shown via JS */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-accept:hover {
    background: var(--secondary);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-link {
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.lang-link:hover {
    color: var(--primary);
}

.lang-divider {
    color: var(--glass-border);
}

.lang-active {
    color: var(--primary);
}

@media (max-width: 768px) {
    .lang-switcher {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
    }
}

/* --- Language Dropdown --- */
.lang-dropdown {
    position: relative;
    margin-left: 1rem;
    z-index: 1001;
    /* Ensure it's above other elements */
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    transition: var(--transition);
    border-radius: 8px;
}

.lang-btn:hover {
    background: var(--glass-bg);
}

.lang-flag {
    font-size: 1.2rem;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.2s ease-out;
}

.lang-dropdown:hover .lang-menu {
    display: flex;
    /* Show on hover for desktop */
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.lang-item.active {
    display: none;
}

@media (max-width: 768px) {
    .lang-dropdown {
        margin-left: 0;
        margin-top: 1rem;
    }

    .lang-menu {
        position: static;
        /* Stack properly in mobile menu */
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
        /* Hidden by default, toggled via JS or CSS */
        min-width: 100%;
    }

    /* Keep it simple for now on mobile: display all languages inline or always show dropdown if active */
    .lang-dropdown:hover .lang-menu,
    .lang-dropdown:focus-within .lang-menu {
        display: flex;
    }
}

/* Form Feedback */
.form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Animations */
.hero-btns-animated {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.4s forwards;
}

/* --- Rates Page Styles --- */
.rates-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 5rem;
}

.rates-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.rates-intro h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rates-intro p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.rates-section {
    margin-bottom: 6rem;
}

.rates-section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rates-section-title i {
    color: var(--primary);
}

.rates-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    overflow-x: auto;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    min-width: 600px;
}

.rates-table th,
.rates-table td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.rates-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.rates-table td {
    color: var(--text-main);
}

.rates-table tr:last-child td {
    border-bottom: none;
}

.rates-price {
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
    font-size: 1.1rem;
}

.rates-code {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.rates-conditions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.rates-conditions-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: var(--text-muted);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.rates-conditions-list li i {
    color: var(--primary);
    margin-top: 3px;
    flex-shrink: 0;
}

.discount-card {
    background: rgba(14, 165, 233, 0.05);
    border: 1px solid var(--primary-glow);
}

.pa-header {
    background: linear-gradient(to bottom right, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.pa-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.pa-info p {
    color: var(--text-muted);
    margin: 0;
}

/* --- Computer History Museum (Timeline) --- */
.museum-section {
    padding-top: 10rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
    z-index: 1;
}

.timeline-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5rem;
    position: relative;
    z-index: 2;
}

.timeline-event:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content-museum {
    width: 45%;
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.timeline-content-museum:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow);
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.museum-img {
    width: 100%;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.museum-anecdote {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--secondary);
    border-radius: 4px;
    font-style: italic;
    color: var(--text-muted);
}

.code-snippet {
    background: #1e293b;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-event,
    .timeline-event:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px;
    }

    .timeline-content-museum {
        width: 100%;
    }
}

/* --- Registration Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.85);
    /* Dark bg overlay */
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Reusing .form-group logic for modal */
.modal-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-form .form-group input,
.modal-form .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
    resize: vertical;
}

.modal-form .form-group input:focus,
.modal-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}
/* --- Featured Story Highlight --- */
.featured-story-section {
    padding: 2rem 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.featured-story {
    padding: 4rem;
    border: 1px solid var(--glass-border);
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.1), rgba(99, 102, 241, 0.05));
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.featured-story::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.story-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 1.5px;
    margin-bottom: 2.5rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

.featured-story h2 {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    line-height: 1.1;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.featured-story h2 span {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.story-content {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
}

.story-content p {
    margin-bottom: 1.5rem;
}



.featured-story-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.story-highlight-text {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    font-style: italic;
}

@media (max-width: 992px) {
    .story-content {
        column-count: 1;
        text-align: left;
    }
    
    .featured-story h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .featured-story {
        padding: 3rem 2rem;
    }
    
    .featured-story h2 {
        font-size: 2rem;
    }
    
    .featured-story-section {
        padding: 5rem 1.5rem;
    }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.2); }
    50% { box-shadow: 0 0 40px rgba(14, 165, 233, 0.4); }
    100% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.2); }
}

.story-badge {
    animation: pulse-glow 3s infinite;
}

/* Corsi Grid (Responsive 3 Columns) */
.academy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .academy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .academy-grid {
        grid-template-columns: 1fr;
    }
}

/* New Card Highlight with Pulsing Glow Animation */
@keyframes card-glow {
    0% {
        box-shadow: 0 0 5px rgba(14, 165, 233, 0.15), inset 0 0 0 1px rgba(14, 165, 233, 0.05);
        border-color: rgba(14, 165, 233, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.45), inset 0 0 5px rgba(14, 165, 233, 0.15);
        border-color: var(--primary);
    }
    100% {
        box-shadow: 0 0 5px rgba(14, 165, 233, 0.15), inset 0 0 0 1px rgba(14, 165, 233, 0.05);
        border-color: rgba(14, 165, 233, 0.2);
    }
}

.service-card.novita {
    position: relative;
    animation: card-glow 3s infinite ease-in-out;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
    z-index: 2;
}

/* --- Nav Dropdown (Applicazioni) --- */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    transition: var(--transition);
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
    color: var(--text-main);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    animation: fadeIn 0.2s ease-out;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
}

.nav-dropdown-item.active {
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
        text-align: center;
    }

    .nav-dropdown-btn {
        font-size: 1.5rem;
        margin: 0 auto;
        justify-content: center;
        padding: 0.8rem;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
        min-width: 100%;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        display: flex;
    }

    .nav-dropdown-item {
        font-size: 1.2rem;
        justify-content: center;
        padding: 0.8rem;
    }
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    body {
        line-height: 1.7;
    }

    nav,
    nav.scrolled {
        padding: 0.85rem 1rem;
        gap: 0.75rem;
    }

    .logo {
        align-items: flex-start;
        max-width: calc(100% - 4.5rem);
    }

    .logo img {
        height: 46px;
    }

    .logo-text {
        font-size: 0.72rem;
        line-height: 1.2;
        white-space: normal;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        background: rgba(15, 23, 42, 0.88);
        flex-shrink: 0;
    }

    .nav-links {
        top: 0;
        right: -100%;
        width: min(88vw, 24rem);
        height: 100dvh;
        padding: 6rem 1.25rem 2rem;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.4rem;
        overflow-y: auto;
        background: rgba(3, 7, 18, 0.98);
        backdrop-filter: blur(18px);
    }

    .nav-links a,
    .nav-dropdown-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 3.25rem;
        padding: 0.9rem 1rem;
        border-radius: 14px;
        font-size: 1.05rem;
        text-align: center;
        line-height: 1.3;
    }

    .nav-links a {
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-links a.active,
    .nav-links a:hover,
    .nav-dropdown-btn:hover {
        background: rgba(99, 102, 241, 0.16);
    }

    .lang-dropdown,
    .nav-dropdown {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .lang-btn,
    .nav-dropdown-btn {
        width: 100%;
        justify-content: center;
        min-height: 3.25rem;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-main);
    }

    .lang-menu,
    .nav-dropdown-menu {
        position: static;
        min-width: 100%;
        margin-top: 0.5rem;
        padding: 0.4rem;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--glass-border);
        box-shadow: none;
    }

    .lang-dropdown:hover .lang-menu,
    .lang-dropdown:focus-within .lang-menu,
    .lang-dropdown.open .lang-menu,
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu,
    .nav-dropdown.open .nav-dropdown-menu {
        display: flex;
    }

    .lang-item,
    .nav-dropdown-item {
        justify-content: center;
        white-space: normal;
        text-align: center;
        line-height: 1.35;
    }

    main {
        overflow-x: clip;
    }

    section,
    .rates-container,
    .contact-container,
    .about-container,
    .services-container,
    .timeline-container,
    .privacy-container,
    .page-content,
    .container {
        width: min(100%, 100%);
    }

    section {
        padding: 4.5rem 1rem;
    }

    .hero {
        min-height: 100dvh;
        height: auto;
        padding: 7rem 1rem 3.5rem;
        align-items: flex-start;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 2.9rem);
        line-height: 1.08;
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .hero-btns,
    .hero-btns-animated {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .hero-btns .btn,
    .hero-btns-animated .btn {
        width: 100%;
        margin-left: 0 !important;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2,
    .rates-intro h1,
    .page-header h1,
    .contact-info h2,
    .book-info h2 {
        font-size: clamp(1.8rem, 7vw, 2.35rem);
        line-height: 1.12;
    }

    .section-header p,
    .page-header p,
    .rates-intro p {
        font-size: 1rem;
    }

    .service-card,
    .contact-form,
    .rates-card,
    .book-detail,
    .book-card,
    .privacy-section,
    .timeline-content,
    .timeline-content-museum {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .service-card {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .page-header {
        padding: 7rem 1rem 1.5rem;
    }

    .page-header-inner {
        gap: 1rem;
    }

    .page-header-logo {
        width: min(38vw, 5.5rem);
    }

    .apps-grid {
        margin-top: 2rem;
        gap: 1.25rem;
    }

    .app-card {
        cursor: default;
    }

    .app-expand-hint {
        top: 0.65rem;
        right: 0.65rem;
    }

    .app-text-content {
        padding: 1rem;
        gap: 0.8rem;
    }

    .app-header h2 {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .app-description,
    .app-features li {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .badge {
        font-size: 0.72rem;
        padding: 0.4rem 0.65rem;
    }

    .app-actions .btn,
    .btn {
        width: 100%;
        text-align: center;
    }

    .contact-container {
        padding-top: 7rem !important;
        padding-left: 1rem;
        padding-right: 1rem;
        margin-bottom: 3.5rem;
    }

    .info-item {
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .book-detail,
    .about-hero,
    .profile-layout,
    .timeline-event,
    .timeline-event:nth-child(even) {
        gap: 1.5rem;
    }

    .book-cover,
    .profile-img-placeholder,
    .profile-container img {
        max-width: min(78vw, 320px);
        margin-left: auto;
        margin-right: auto;
    }

    .rates-container {
        padding: 7rem 1rem 3rem;
    }

    .rates-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .rates-table {
        min-width: 540px;
    }

    .rates-table th,
    .rates-table td {
        padding: 0.9rem 0.8rem;
    }

    .cookie-banner {
        bottom: 1rem;
        width: calc(100% - 1rem);
        padding: 1rem;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-actions .btn-small {
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    nav,
    nav.scrolled {
        padding: 0.75rem 0.85rem;
    }

    .hero {
        padding-top: 6.5rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle,
    .section-header p,
    .page-header p,
    .rates-intro p {
        font-size: 0.96rem;
    }

    .page-header h1,
    .section-header h2,
    .contact-info h2,
    .rates-intro h1 {
        font-size: 1.7rem;
    }

    .app-card.is-fullscreen {
        inset: 0.35rem;
        max-height: calc(100dvh - 0.7rem);
    }

    .app-card.is-fullscreen .app-image-container {
        min-height: 180px;
    }

    .course-video-gallery {
        grid-template-columns: 1fr;
    }

    .rates-table {
        min-width: 500px;
    }

    .modal-content {
        width: calc(100% - 1rem);
        padding: 1.25rem;
    }
}
