/* Modern 2025 School Website Styles */

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

/* ── Semantic Aliases (map design-tokens to short names) ── */
:root {
    --brand-primary-500: var(--color-brand-primary);
    --brand-primary-700: var(--color-brand-primary-dark);
    --brand-news-cta-500: var(--brand-primary-500);
    --brand-news-cta-700: var(--brand-primary-700);
    --brand-accent-500: var(--color-accent-emerald);
    --brand-accent-700: #0f766e;
    --brand-accent-800: #115e59;
    --content-strong: var(--color-text-primary);
    --content-muted: var(--color-text-secondary);
    --surface: var(--color-surface-light);
    --surface-muted: var(--color-surface-neutral);
    --border: var(--color-neutral-200);
    --card-radius: 24px;
    --card-padding: 2rem;
    --card-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    --card-shadow-hover: 0 14px 24px rgba(15, 23, 42, 0.12);
    --card-border: var(--border);
    --card-bg: var(--surface);
    --card-hover-translate: -4px;
}

.dark {
    --content-strong: #f8fafc;
    --content-muted: #cbd5e1;
    --surface: #0f172a;
    --surface-muted: #111827;
    --border: #1f2937;
}

/* ── Hero Section ── */
/* --gradient-hero: khai báo duy nhất tại design-tokens.css */

.hero-title {
    font-size: clamp(2.75rem, 2rem + 3.2vw, 4.75rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--color-text-on-dark);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-lead {
    font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.5rem);
    line-height: var(--lh-body);
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.hero-gradient-bg {
    background: var(--gradient-hero);
}

.hero-gradient-overlay {
    background: var(--gradient-hero);
    opacity: 0.65;
}

/* ── Typography Utilities ── */
.title-sm {
    font-size: var(--fs-h3);
    font-weight: 600;
    line-height: var(--lh-tight);
    color: var(--content-strong);
}

.title-invert {
    color: #fff !important;
}

.lead {
    font-size: var(--fs-300);
    line-height: var(--lh-body);
    color: var(--content-muted);
}

.lead-invert {
    color: rgba(255, 255, 255, 0.86) !important;
}

.eyebrow {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.text-strong {
    color: var(--content-strong);
}

.text-muted {
    color: var(--content-muted);
}

/* ── Footer ── */
.footer-navy {
    background: rgb(0 0 0 / 73%);
}

/* Typography — Quản lý bởi typography.css + design-tokens.css */

/* Utility Classes */
.section {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 120px 0;
    }
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: var(--lh-tight);
    text-wrap: balance;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 42rem;
    margin: 0 auto;
    text-wrap: balance;
}

.card {
    background: var(--color-surface-light);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--color-brand-primary);
    color: var(--color-text-on-primary);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    background: var(--color-brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.4);
}

.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: #fff;
    color: var(--color-brand-primary);
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-light:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: transparent;
    color: #fff;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-brand-primary);
    font-weight: 600;
    border: 2px solid var(--color-brand-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--color-brand-primary);
    color: var(--color-text-on-primary);
    transform: translateY(-2px);
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slideUp {
    animation: slideUp 1s ease-out;
}

/* Hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Glassmorphism (light) */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.dark .glass {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Prose styles for content */
.prose {
    color: inherit;
    font-size: 1.125rem;
    line-height: 1.8;
}

.prose p {
    margin-bottom: 1.5em;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--color-text-primary);
}

.prose h2 {
    font-size: 2rem;
}

.prose h3 {
    font-size: 1.5rem;
}

.prose img {
    border-radius: 16px;
    margin: 2em 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.prose a {
    color: var(--color-brand-primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.prose a:hover {
    color: var(--color-brand-primary-dark);
}

.dark .prose {
    color: #e5e7eb;
}

.dark .prose h1, .dark .prose h2, .dark .prose h3, .dark .prose h4 {
    color: #f9fafb;
}

.dark .prose strong {
    color: #f9fafb;
}

/* Gallery masonry */
.break-inside-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Gradient overlays */
.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9) 0%, rgba(127, 29, 29, 0.95) 100%);
}

/* Scroll animations - Intersection Observer will add these classes */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Premium shadows */
.shadow-premium {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-premium-lg {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image hover effects */
.image-hover {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Container spacing */
.container-spacing {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-spacing {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-spacing {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

/* Card grid spacing */
.card-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .card-grid {
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .card-grid {
        gap: 3rem;
    }
}

/* ── Form Components (footer consultation form) ── */
.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--content-strong);
    margin-bottom: 0.35rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--content-strong);
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary-500);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.dark .form-input::placeholder,
.dark .form-textarea::placeholder {
    color: #64748b;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ── Partner Logos Marquee ── */
.partner-marquee-frame {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
}

.partner-marquee {
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.partner-marquee-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: partner-marquee 24s linear infinite;
}

.partner-marquee-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    text-decoration: none;
}

.partner-marquee-item img {
    height: 52px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    filter: none;
    opacity: 1;
}

.partner-logo-fallback {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--content-muted);
    background: var(--surface-muted);
    white-space: nowrap;
}

.partner-marquee-empty {
    text-align: center;
    font-size: 0.95rem;
    color: var(--content-muted);
}

@media (max-width: 480px) {
    .partner-marquee-track {
        gap: 1.5rem;
    }

    .partner-marquee-item {
        height: 52px;
    }

    .partner-marquee-item img {
        height: 40px;
        max-width: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .partner-marquee-track {
        animation: none;
    }
}

@keyframes partner-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}
