@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #1a365d;
    --primary-light: #2b6cb0;
    --secondary-color: #0f172a;
    --accent-color: #c08427;
    --bg-color: #fcfaf8;
    --surface-color: #ffffff;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

body.dark-mode {
    --primary-color: #90cdf4;
    --primary-light: #63b3ed;
    --secondary-color: #0f172a;
    --accent-color: #f6e05e;
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --border-color: #334155;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.4);
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.7; 
    transition: background-color 0.3s, color 0.3s; 
    overflow-x: hidden; 
    font-family: var(--font-sans); 
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 600; color: var(--primary-color); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Preloader */
#preloader { position: fixed; inset: 0; background: var(--bg-color); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Navbar */
.navbar { position: fixed; top: 0; width: 100%; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: var(--transition); border-bottom: 1px solid var(--border-color); }
.navbar.scrolled { padding: 0.8rem 5%; box-shadow: var(--shadow); }
.logo a { font-size: clamp(1.5rem, 3vw, 1.8rem); font-weight: 700; color: var(--primary-color); letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.9rem; transition: var(--transition); color: var(--text-color); text-transform: uppercase; letter-spacing: 1px; position: relative; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background-color: var(--accent-color); transition: var(--transition); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--accent-color); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--surface-color); min-width: 240px; box-shadow: var(--shadow-hover); border-radius: 12px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); padding: 0.5rem; border: 1px solid var(--border-color); }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li a { padding: 0.8rem 1rem; display: block; border-radius: 8px; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
.dropdown-menu li a::after { display: none; }
.dropdown-menu li a:hover { background: var(--bg-color); color: var(--primary-color); padding-left: 1.5rem; }

/* Mobile Menu & Actions */
.nav-actions { display: flex; gap: 1rem; align-items: center; }
.icon-btn { background: var(--surface-color); border: 1px solid var(--border-color); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text-color); cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.icon-btn:hover { color: var(--accent-color); border-color: var(--accent-color); transform: translateY(-2px); }
.mobile-only { display: none; }

/* Hero Section */
.hero { height: 100vh; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover fixed; color: #fff; padding: 0 20px; position: relative; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 700; margin-bottom: 1.5rem; animation: fadeInUp 1s ease; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { font-size: clamp(1rem, 2.5vw, 1.25rem); margin-bottom: 2.5rem; max-width: 800px; opacity: 0.9; animation: fadeInUp 1s ease 0.2s; animation-fill-mode: both; font-weight: 300; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 1rem 2.5rem; border-radius: 9999px; font-weight: 500; font-size: 0.95rem; transition: var(--transition); cursor: pointer; border: none; text-transform: uppercase; letter-spacing: 1px; }
.btn-primary { background: var(--accent-color); color: #fff; box-shadow: 0 4px 15px rgba(192, 132, 39, 0.3); }
.btn-primary:hover { background: #a67221; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(192, 132, 39, 0.4); }
.btn-outline { background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.5); color: #fff; margin-left: 1rem; }
.btn-outline:hover { background: #fff; color: var(--primary-color); transform: translateY(-3px); }
.hero-btns { animation: fadeInUp 1s ease 0.4s; animation-fill-mode: both; }

/* Page Header */
.page-header { padding: 10rem 5% 5rem; background: linear-gradient(to bottom, var(--border-color), var(--bg-color)); text-align: center; border-bottom: 1px solid var(--border-color); }
.page-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--primary-color); margin-bottom: 1rem; }
.page-header p { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* Sections */
.section { padding: 6rem 5%; }
.section-title { text-align: center; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 4rem; color: var(--primary-color); position: relative; font-family: var(--font-serif); }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent-color); margin: 1.5rem auto 0; border-radius: 2px; }

/* Grid Layouts */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 4rem; align-items: center; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }

/* Cards */
.card { background: var(--surface-color); padding: 3rem 2rem; border-radius: 20px; box-shadow: var(--shadow); text-align: center; transition: var(--transition); border: 1px solid var(--border-color); position: relative; overflow: hidden; z-index: 1; }
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-color); transform: scaleX(0); transition: transform 0.4s ease; transform-origin: left; z-index: -1; }
.card:hover::before { transform: scaleX(1); }
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.card-icon-wrapper { width: 80px; height: 80px; background: var(--bg-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; border: 1px solid var(--border-color); transition: var(--transition); }
.card:hover .card-icon-wrapper { background: var(--primary-color); border-color: var(--primary-color); }
.card i { font-size: 2rem; color: var(--accent-color); transition: var(--transition); }
.card:hover i { color: #fff; }
.card h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.card p { font-size: 0.95rem; color: var(--text-light); line-height: 1.7; }

/* Course Cards */
.course-card { background: var(--surface-color); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.course-img { height: 140px; background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; position: relative; }
.course-img::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 20px; background: var(--surface-color); clip-path: polygon(0 100%, 100% 100%, 100% 0); }
.course-content { padding: 2rem; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.course-content h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.course-content p { font-size: 0.9rem; color: var(--text-light); }

/* Image Styling */
.rounded-image { border-radius: 20px; box-shadow: var(--shadow); width: 100%; object-fit: cover; transition: var(--transition); }
.rounded-image:hover { box-shadow: var(--shadow-hover); transform: scale(1.02); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: 20px; height: 280px; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 50%, transparent 100%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2rem; opacity: 0; transition: var(--transition); color: #fff; font-size: 1.2rem; font-family: var(--font-serif); letter-spacing: 1px; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Contact Form */
.contact-form { background: var(--surface-color); padding: 3rem; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--border-color); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; color: var(--text-color); }
.form-control { width: 100%; padding: 1rem 1.2rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-color); color: var(--text-color); transition: var(--transition); font-family: var(--font-sans); font-size: 1rem; }
.form-control:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 4px rgba(192, 132, 39, 0.1); background: var(--surface-color); }
textarea.form-control { resize: vertical; height: 150px; }

/* Footer */
footer { background: var(--secondary-color); color: #f1f5f9; padding: 5rem 5% 2rem; border-top: 4px solid var(--accent-color); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-section h3 { color: #fff; margin-bottom: 1.5rem; font-size: 1.3rem; font-family: var(--font-serif); position: relative; padding-bottom: 0.5rem; }
.footer-section h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--accent-color); }
.footer-section ul li { margin-bottom: 1rem; font-size: 0.95rem; }
.footer-section ul li a { color: #94a3b8; transition: var(--transition); display: inline-block; }
.footer-section ul li a:hover { color: var(--accent-color); transform: translateX(5px); }
.footer-section p { margin-bottom: 1rem; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: #94a3b8; }
.footer-section p i { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #64748b; }

/* Back to Top */
#back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--primary-color); color: #fff; width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999; box-shadow: var(--shadow-hover); }
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--accent-color); transform: translateY(-5px); }

/* Animations */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 992px) {
    .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
    .hero-btns { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
    .btn-outline { margin-left: 0; }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem 5%; }
    .nav-links { position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); background: var(--surface-color); flex-direction: column; padding: 2rem; transition: var(--transition); overflow-y: auto; box-shadow: var(--shadow); }
    .nav-links.active { left: 0; }
    .nav-links a { font-size: 1.1rem; width: 100%; text-align: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
    .nav-links a::after { display: none; }
    .mobile-only { display: flex; }
    .dropdown { width: 100%; }
    .dropdown-menu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding: 0; margin-top: 0; border: none; background: var(--bg-color); }
    .dropdown.active .dropdown-menu { display: block; }
    .dropdown-menu li a { border-bottom: 1px solid var(--border-color); border-radius: 0; padding: 1rem; }
    .section { padding: 4rem 5%; }
}
