/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Enhanced from original */
    --primary-color: #4ab0c1;
    --primary-light: #61d8d9;
    --primary-dark: #2a8b99;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --background-light: #f8f9fa;
    --background-dark: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(74, 176, 193, 0.9) 0%, rgba(97, 216, 217, 0.9) 100%);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 10px 40px rgba(0, 0, 0, 0.2);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-small: 8px;
    --radius-medium: 16px;
    --radius-large: 24px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-small);
    text-decoration: none;
    z-index: 10000;
    transition: top var(--transition-medium);
}

.skip-link:focus {
    top: 8px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    padding-top: 10px;
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-medium);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-medium);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all var(--transition-medium);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/carmen.jpg') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-text {
    color: var(--text-light);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInRight 1s ease 0.6s forwards;
}

.image-frame {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    padding: 8px;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-heavy);
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--text-light);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    background: var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.text-block {
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.text-block:nth-child(1) {
    animation-delay: 0.1s;
}

.text-block:nth-child(2) {
    animation-delay: 0.2s;
}

.text-block:nth-child(3) {
    animation-delay: 0.3s;
}

.text-block:nth-child(4) {
    animation-delay: 0.4s;
}

.text-block:nth-child(5) {
    animation-delay: 0.5s;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.feature:nth-child(1) {
    animation-delay: 0.2s;
}

.feature:nth-child(2) {
    animation-delay: 0.4s;
}

.feature:nth-child(3) {
    animation-delay: 0.6s;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
}

.feature h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== INSTRUMENTS SECTION ===== */
.instruments {
    padding: var(--section-padding);
    background: white;
}

.instruments-content {
    display: grid;
    gap: 60px;
}

.video-container {
    display: flex;
    justify-content: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding-bottom: 45%;
    /* 16:9 aspect ratio */
    height: 0;
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.instrument-card {
    background: var(--background-light);
    padding: 40px 30px;
    border-radius: var(--radius-large);
    text-align: center;
    transition: all var(--transition-medium);
    border: 2px solid transparent;
}

.instrument-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-medium);
}

.instrument-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

.instrument-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.instrument-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== LESSONS SECTION ===== */
.lessons {
    padding: var(--section-padding);
    background: var(--background-light);
}

.lessons-content {
    text-align: center;
}

.lessons-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}

.text-link:hover {
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.school-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
    border: 2px solid transparent;
}

.school-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-medium);
}

.school-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.school-info p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding);
    background: white;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-info {
    width: 100%;
    max-width: 600px;
}

.contact-card {
    background: var(--background-light);
    padding: 60px 40px;
    border-radius: var(--radius-large);
    text-align: center;
    box-shadow: var(--shadow-light);
}

.contact-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2.5rem;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.email-reverse {
    unicode-bidi: bidi-override;
    direction: rtl;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 40px 0;
}

.footer-content {
    text-align: center;
}

.footer-text p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Offset for fixed navbar when navigating to anchors */
section[id] {
    scroll-margin-top: 100px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 16px;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 50px;
        gap: 30px;
        transition: left var(--transition-medium);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding-top: 100px;
    }

    .hero-image {
        order: -1;
    }

    .image-frame {
        width: 280px;
        height: 280px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .schools-grid {
        grid-template-columns: 1fr;
    }

    .school-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .instruments-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .video-wrapper {
        padding-bottom: 56.25%;
        /* 16:9 aspect ratio for mobile */
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .contact-card {
        padding: 40px 20px;
    }

    .school-card,
    .instrument-card {
        padding: 30px 20px;
    }

    .about-features {
        gap: 30px;
    }

    .feature {
        padding: 24px;
    }

    .btn {
        margin-bottom: 1rem;
    }
}

/* ===== SMOOTH SCROLLING & SCROLL BEHAVIOR ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-content>* {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.8s ease forwards;
    }

    .section-header {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.8s ease forwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator {
        animation: none;
    }
}