/* ==========================================================================
   SMAN 13 PEKANBARU - Main Stylesheet
   Modern, Clean, and Premium Design
   ========================================================================== */

/* CSS Variables */
:root {
    /* Colors - Modern HSL Palette */
    --primary-h: 225;
    --primary-s: 71%;
    --primary-l: 40%;

    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 30%);
    --primary-soft: hsl(var(--primary-h), 40%, 93%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 60%);
    --bg-soft: hsl(var(--primary-h), 50%, 94%);

    --secondary-h: 160;
    --secondary-s: 84%;
    --secondary-l: 30%;

    --secondary: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l));
    --secondary-soft: hsl(var(--secondary-h), var(--secondary-s), 95%);

    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Neutrals */
    --white: #ffffff;
    --black: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Shadows - Premium Elevation */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--gray-600);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.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.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
.header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

.header__top {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
}

.header__top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__info {
    display: flex;
    gap: 1.5rem;
}

.header__social {
    display: flex;
    gap: 1rem;
}

.header__social a {
    color: white;
    opacity: 0.8;
}

.header__social a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.header__main {
    padding: 1rem 0;
    transition: var(--transition-base);
}

.header__main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 60px;
}

.logo__text b {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-dark);
    line-height: 1;
}

.logo__text span {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Navigation */
.nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav__link {
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.nav__link:hover,
.nav__link.active {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary-dark);
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition-base);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 80vh;
    min-height: 600px;
    background: var(--black);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 3s ease-out;
    /* Matched to 3s duration */
}

/* Animation Variant 1: Zoom Out (Default) */
.hero-slide.active img {
    transform: scale(1);
}

/* Animation Variant 2: Zoom In */
.hero-slide.effect-zoom.active img {
    transform: scale(1.2);
    transition: transform 3s ease-out;
}

/* Animation Variant 3: Pan Right */
.hero-slide.effect-pan.active img {
    transform: scale(1.1) translateX(-20px);
    transition: transform 3s ease-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(15, 23, 42, 0.8) 0%,
            rgba(15, 23, 42, 0.4) 50%,
            rgba(15, 23, 42, 0.2) 100%);
    display: flex;
    align-items: center;
    z-index: 3;
}

.hero-content {
    color: white;
    max-width: 700px;
    padding: 2rem;
}

.hero-content h1 {
    color: white;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s 0.2s ease-out;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s 0.4s ease-out;
}

.hero-slide.active .hero-content h1,
.hero-slide.active .hero-content p,
.hero-slide.active .hero-btns {
    opacity: 1;
    transform: translateY(0);
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s 0.6s ease-out;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    cursor: pointer;
    font-size: 1rem;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.4);
}

.btn-white {
    background: white;
    color: var(--primary-dark);
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-dark);
}

/* Sections */
.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    background: white;
}

.section--soft {
    background: var(--bg-soft);
}

.section--primary {
    background: var(--primary);
    color: white;
}

.section-title {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.section-title h2 {
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 5px;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: -5rem;
    position: relative;
    z-index: 10;
}

.info-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--gray-100);
}

.info-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
}

.info-card__icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    height: 80px;
    width: 80px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    color: var(--primary);
    transition: var(--transition-base);
}

.info-card:hover .info-card__icon {
    background: var(--primary);
    color: white;
    transform: rotateY(360deg);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.card__image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card__image img {
    height: 100%;
    width: 100%;
    transition: transform 1s ease;
}

.card:hover .card__image img {
    transform: scale(1.1);
}

.card__content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    font-weight: 500;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card__title a {
    color: var(--gray-900);
}

.card__title a:hover {
    color: var(--primary);
}

.card__excerpt {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--spacing-2xl) 0 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer__title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.footer__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 1rem;
}

.footer__links a {
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__links a:hover {
    color: white;
    padding-left: 5px;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__top {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: white;
        flex-direction: column;
        padding: 5rem 2rem;
        transition: 0.4s;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        gap: 1rem;
    }

    .nav.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        height: 60vh;
    }

    .info-grid {
        margin-top: -2rem;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}