/*
================================================
e-studio Website Stylesheet
Version: 3.0 (Enhanced Interactivity)
Author: The World's Best Web Developer
================================================
*/

/* --- Variables and Basic Setup --- */
:root {
    --primary-orange: #FF8C00;
    --background-cream: #FFF5E1;
    --dark-text: #4A2E04;
    --white: #FFFFFF;
    --light-gray: #f9f9f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: 'Poppins', 'Kanit', sans-serif;
    margin: 0;
    background-color: var(--white);
    color: var(--dark-text);
    overflow-x: hidden; /* Prevents horizontal scroll */
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--primary-orange);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}
.logo-link { text-decoration: none; }
.logo {
    height: 50px;
    transition: transform 0.3s ease;
}
.logo:hover {
    transform: scale(1.05) rotate(-3deg);
}

.nav-container { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; }
.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 1.5rem 1rem;
    transition: background-color 0.3s;
    position: relative;
}
.nav-links a:not(.nav-programs-link)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    transition: width 0.3s ease;
}
.nav-links a:hover::after {
    width: 60%;
}

.nav-item { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 8px 16px var(--shadow-color);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    min-width: 240px;
    z-index: 1100;
    animation: fadeInDropdown 0.3s ease forwards;
    transform-origin: top center;
}
.dropdown a {
    color: var(--dark-text);
    padding: 12px 16px;
    display: block;
    white-space: nowrap;
}
.dropdown a:hover { background-color: var(--background-cream); }
.nav-item:hover .dropdown { display: block; }
.language-switcher {
    margin-left: 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 5px;
    display: flex;
}
.language-switcher button {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}
.language-switcher button.active {
    background: var(--white);
    color: var(--primary-orange);
}
.mobile-menu-icon { display: none; cursor: pointer; font-size: 2rem; color: var(--white); }

/* --- Hero Slider --- */
.hero-slider { width: 100%; height: 75vh; position: relative; overflow: hidden; }
.slide { width: 100%; height: 100%; position: absolute; opacity: 0; transition: opacity 1.2s ease-in-out; }
.slide.active { opacity: 1; }
.slide-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); animation: zoomIn 20s infinite; }
.slide-content { position: relative; z-index: 2; color: var(--white); height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem; }
.slide-content h1 { 
    font-size: 4rem; 
    font-weight: 800; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: slideInUp 1s ease forwards;
}
.slide-content p { 
    font-size: 1.4rem; 
    max-width: 600px; 
    animation: slideInUp 1s ease forwards 0.2s;
    opacity: 0;
}

/* --- General Sections & Cards --- */
.container { padding: 5rem 2rem; }
.section-title { text-align: center; font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; }
.section-subtitle { text-align: center; font-size: 1.2rem; max-width: 800px; margin: 0 auto 4rem auto; color: #666; line-height: 1.8; }
.about-section { background-color: var(--background-cream); }
.core-programs { background-color: var(--light-gray); }

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: auto;
}
.featured-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.featured-card:hover {
    transform: translateY(-15px) perspective(1000px) rotateX(2deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}
.featured-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.featured-card img { width: 100%; height: 220px; object-fit: cover; }
.featured-card h3 { font-size: 1.5rem; margin: 0 0 0.5rem 0; }
.featured-card p { font-size: 1rem; color: #555; padding: 0 1.5rem; margin-bottom: 1.5rem; flex-grow: 1;}
.apply-btn {
    display: inline-block;
    background-color: var(--primary-orange);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    transition: all 0.3s ease;
}
.apply-btn:hover { background-color: var(--dark-text); transform: scale(1.05); }
.apply-btn:active { transform: scale(0.95); }

.program-card {
    background: var(--white);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: var(--dark-text);
}
.program-card:hover { transform: translateY(-15px) perspective(1000px) rotateX(2deg); box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
.program-card img { width: 100%; height: 180px; object-fit: cover; }
.program-card-content { padding: 1.5rem; }
.program-card h3 { margin-top: 0; font-size: 1.4rem; }
.program-card p { font-size: 0.9rem; line-height: 1.6; color: #666; }
.program-card .result { font-weight: 600; color: var(--primary-orange); }

.testimonial-card {
    background: var(--background-cream);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border-left: 5px solid var(--primary-orange);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@keyframes fadeInDropdown {
    from { opacity: 0; transform: scaleY(0.9); }
    to { opacity: 1; transform: scaleY(1); }
}
@keyframes zoomIn {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Footer --- */
.footer { background-color: var(--dark-text); color: var(--background-cream); padding: 4rem 2rem 2rem 2rem; text-align: center; }
.footer-links { margin-bottom: 2rem; }
.footer-links a { color: var(--background-cream); text-decoration: none; margin: 0 1rem; font-weight: 600; }

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .header { padding: 0.5rem 1rem; }
    .nav-container { width: 100%; justify-content: flex-end; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--primary-orange); }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 1rem; width: 100%; text-align: center; }
    .dropdown { position: static; display: block; background: none; box-shadow: none; }
    .dropdown a { color: var(--white); background-color: rgba(0,0,0,0.1); margin: 0.2rem 1rem; border-radius: 5px; }
    .language-switcher { position: absolute; right: 60px; top: 18px; }
    .mobile-menu-icon { display: block; }
    .slide-content h1 { font-size: 2.5rem; }
}
@media (max-width: 576px) {
    .slide-content h1 { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .container { padding: 3rem 1rem; }
}