/*
Theme Name:  Layla Piano Studio
Theme URI:   https://your-domain.com
Author:      Your Name
Author URI:  https://your-domain.com
Description: A elegant, warm beige WordPress theme for piano teachers and music studios. Fully editable via the Customizer. WPML & Polylang ready. Compatible with Contact Form 7.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: layla-piano
Tags:        music, one-page, custom-logo, custom-menu, featured-images, theme-options, translation-ready
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --beige:     #F5EFE6;
    --ivory:     #FBF7F2;
    --gold:      #C9A96E;
    --gold-dark: #8B6F47;
    --espresso:  #2C2416;
    --sand:      #E0D5C5;
    --cream:     #FAF6F0;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-family: 'Lato', sans-serif;
}

body {
    background: var(--beige);
    color: var(--espresso);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: var(--ivory);
    border-bottom-color: var(--sand);
}

.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--espresso);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-logo img.custom-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-logo .logo-dot { color: var(--gold); }

/* WordPress nav menu reset */
#navbar .menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#navbar .menu a {
    text-decoration: none;
    color: var(--espresso);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

#navbar .menu a:hover,
#navbar .menu .current-menu-item > a { color: var(--gold); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 101;
}

.hamburger span {
    width: 24px;
    height: 1.5px;
    background: var(--espresso);
    display: block;
    transition: all 0.3s;
}

/* =============================================
   SHARED SECTION UTILITIES
   ============================================= */
section { padding: 5rem 3rem; }

.section-label {
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.section-divider {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 1.5rem 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-gold {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--gold);
    color: var(--espresso);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: transparent;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid var(--gold);
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s;
    margin-left: 1rem;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--espresso);
}

/* =============================================
   HERO SECTION
   ============================================= */
#hero {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 22, 0.55);
}

.hero-content {
    color: #fff;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.hero-buttons .btn-outline { margin-left: 0; }

/* =============================================
   ABOUT SECTION
   ============================================= */
#about { background: var(--ivory); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-img { position: relative; }

.about-img img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -15px; left: -15px; right: 15px; bottom: 15px;
    border: 1px solid var(--gold);
    z-index: 0;
}

.about-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.about-text {
    font-size: 1rem;
    line-height: 1.9;
    color: #5a4a3a;
    margin-bottom: 1.5rem;
}

/* =============================================
   SERVICES / LESSONS SECTION
   ============================================= */
#services { background: var(--beige); }

.services-wrap { max-width: 1100px; margin: 0 auto; }

.services-header { text-align: center; margin-bottom: 3rem; }
.services-header .section-divider { margin: 1.5rem auto; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--ivory);
    border: 1px solid var(--sand);
    padding: 2.5rem 2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(44,36,22,0.12); }
.card:hover::after { transform: scaleX(1); }

.card-icon { font-size: 2rem; margin-bottom: 1.5rem; }

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.card-body { font-size: 0.9rem; line-height: 1.8; color: #6b5a48; }

.card-expand {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sand);
    font-size: 0.85rem;
    color: var(--gold-dark);
    line-height: 1.8;
}

.card.open .card-expand { display: block; }

.card-caret {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    font-size: 1.2rem;
    color: var(--gold);
    transition: transform 0.3s;
}

.card.open .card-caret { transform: rotate(180deg); }

/* =============================================
   WHY SECTION
   ============================================= */
#why {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 6rem 3rem;
    position: relative;
}

#why::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 22, 0.75);
}

#why > * { position: relative; z-index: 1; }
#why .section-title { color: #fff; }
#why .section-label { color: var(--gold); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 3rem auto 0;
    text-align: left;
}

.why-item { display: flex; gap: 1rem; align-items: flex-start; }

.why-chevron {
    color: var(--gold);
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.why-text h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.why-text p { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.75); }

/* =============================================
   GALLERY SECTION
   ============================================= */
#gallery { background: var(--ivory); }

.gallery-wrap { max-width: 1100px; margin: 0 auto; }

.gallery-header { text-align: center; margin-bottom: 3rem; }
.gallery-header .section-divider { margin: 1.5rem auto; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.08); }

/* =============================================
   TESTIMONIALS SECTION
   ============================================= */
#testimonials { background: var(--beige); }

.testimonials-wrap { max-width: 900px; margin: 0 auto; text-align: center; }
.testimonials-wrap .section-divider { margin: 1.5rem auto; }

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

.quote-card {
    background: var(--ivory);
    border-left: 3px solid var(--gold);
    padding: 2rem;
    text-align: left;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--espresso);
    margin-bottom: 1rem;
}

.quote-author {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

/* =============================================
   CONTACT SECTION
   ============================================= */
#contact { background: var(--ivory); }

.contact-wrap { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-wrap .section-divider { margin: 1.5rem auto; }

.contact-intro {
    font-size: 0.95rem;
    color: #6b5a48;
    line-height: 1.8;
    margin-top: 0.5rem;
}

.contact-form { margin-top: 2.5rem; display: grid; gap: 1rem; text-align: left; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.form-group input,
.form-group textarea,
.form-group select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea,
.wpcf7 select {
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--sand);
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--espresso);
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus { border-color: var(--gold); }

.form-group textarea { height: 130px; resize: vertical; }

/* CF7 overrides */
.wpcf7-form { text-align: left; margin-top: 2rem; }
.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--espresso);
    border: none;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.3s, transform 0.2s;
}
.wpcf7-form input[type="submit"]:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); }
.wpcf7-not-valid-tip { color: #c0392b; font-size: 0.8rem; margin-top: 4px; }
.wpcf7-response-output { margin-top: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--sand); font-size: 0.85rem; }

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--sand);
}

.contact-item { text-align: center; }

.contact-item .c-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.contact-item p { font-size: 0.9rem; color: var(--espresso); }

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: var(--espresso);
    color: rgba(255,255,255,0.6);
    padding: 2rem 3rem;
    text-align: center;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    list-style: none;
    padding: 0;
}

.footer-menu a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer-menu a:hover { color: var(--gold); }

.footer-copy { font-size: 0.75rem; }

/* =============================================
   SCROLL ANIMATION
   ============================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: none; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    #navbar { padding: 1rem 1.5rem; }

    #navbar .menu {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: var(--ivory);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 99;
    }

    #navbar .menu.open { display: flex; }

    .hamburger { display: flex; }

    .about-grid,
    .cards-grid,
    .why-grid,
    .quotes-grid { grid-template-columns: 1fr; }

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

    .form-row { grid-template-columns: 1fr; }

    section { padding: 4rem 1.5rem; }

    .contact-info { flex-direction: column; gap: 1.5rem; }

    .btn-outline { margin-left: 0; margin-top: 1rem; }

    .hero-buttons { flex-direction: column; align-items: center; }
}

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