/* === Variables === */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --text: #1a1a2e;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* === Container === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 800px; }

/* === Navbar === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    transition: var(--transition); border-bottom: 1px solid transparent;
}
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.navbar-container { display: flex; align-items: center; justify-content: space-between; height: 70px; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.navbar-logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.navbar-logo img { height: 40px; }
.navbar-menu { display: flex; list-style: none; gap: clamp(0.8rem, 2vw, 2rem); align-items: center; flex-shrink: 1; min-width: 0; }
.navbar-menu a { color: var(--text); font-weight: 500; font-size: clamp(0.8rem, 1vw, 0.95rem); position: relative; white-space: nowrap; }
.navbar-menu a:hover { color: var(--primary); }
/* Navbar buttons with explicit color classes override the default link color */
.navbar-menu a[class*="btn-"] { color: inherit; }
.navbar-menu a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: var(--transition);
}
.navbar-menu a:hover::after { width: 100%; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span {
    display: block; width: 24px; height: 2px; background: var(--text);
    margin: 5px 0; transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Hero === */
.hero {
    position: relative; min-height: 90vh; display: flex; align-items: center;
    justify-content: center; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--text) 0%, #2d2b55 100%);
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(37,99,235,0.15) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero h1 { font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: clamp(1.1rem, 2vw, 1.3rem); opacity: 0.85; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem;
    border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: var(--transition); border: 2px solid transparent;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.3); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: #fff; color: var(--text); border-color: #fff; }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: transparent; color: #fff; transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* === Sections === */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 0.75rem; color: var(--text); }
.section-header p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* === Grid === */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === Cards === */
.card {
    background: var(--bg); border-radius: var(--radius-lg); padding: 2.5rem;
    transition: var(--transition); border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-icon {
    width: 64px; height: 64px; border-radius: var(--radius);
    background: var(--primary-light); display: flex; align-items: center;
    justify-content: center; margin-bottom: 1.5rem;
}
.card h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.card p { color: var(--text-light); line-height: 1.7; }

/* === Split Layout === */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-text h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1rem; }
.split-text p { color: var(--text-light); line-height: 1.8; margin-bottom: 1rem; }
.split-text .btn { margin-top: 1rem; }
.split-image, .placeholder-image {
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--bg-alt); min-height: 350px;
    display: flex; align-items: center; justify-content: center;
}

/* === Gallery === */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gallery-item {
    border-radius: var(--radius-lg); overflow: hidden; position: relative;
    aspect-ratio: 4/3; background: var(--bg-alt);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff;
    font-size: 0.9rem; font-weight: 500;
}

/* === Testimonials === */
.testimonial-card {
    background: var(--bg); border-radius: var(--radius-lg); padding: 2.5rem;
    text-align: center; transition: var(--transition); border: 1px solid var(--border);
}
.testimonial-card:hover { box-shadow: var(--shadow); }
.stars { margin-bottom: 1rem; display: flex; justify-content: center; gap: 2px; }
.testimonial-text { font-style: italic; color: var(--text-light); line-height: 1.8; margin-bottom: 1.5rem; font-size: 1.05rem; }
.testimonial-author strong { display: block; color: var(--text); font-size: 1rem; }
.testimonial-author span { color: var(--text-light); font-size: 0.85rem; }

/* === CTA === */
.cta-section {
    padding: 100px 0; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.cta-section h2 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 0.75rem; }
.cta-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

/* === Contact === */
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item svg { flex-shrink: 0; margin-top: 2px; }
.contact-item strong { display: block; margin-bottom: 0.25rem; }
.contact-item p { color: var(--text-light); margin: 0; }

.contact-form-wrap { background: var(--bg); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid var(--border); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-family: var(--font-body); font-size: 0.95rem;
    transition: var(--transition); background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--text); }
.form-group small { display: block; margin-top: 0.25rem; color: var(--text-light); font-size: 0.8rem; }

/* === Page Hero === */
.page-hero {
    padding: 140px 0 60px; background: var(--bg-alt);
    text-align: center; border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; }

/* === Page Content === */
.page-image { border-radius: var(--radius-lg); margin-bottom: 2rem; width: 100%; }
.page-content { line-height: 1.8; }
.page-content h2, .page-content h3 { font-family: var(--font-heading); margin: 2rem 0 1rem; }
.page-content p { margin-bottom: 1rem; color: var(--text-light); }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; }

/* === Auth === */
.auth-card {
    max-width: 450px; margin: 0 auto; background: var(--bg);
    border-radius: var(--radius-lg); padding: 2.5rem;
    border: 1px solid var(--border);
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1.5rem; font-size: 0.9rem; }

/* === Messages === */
.messages-container { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 999; max-width: 600px; width: 90%; }
.alert { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.95rem; animation: slideDown 0.3s ease; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #93c5fd; }
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* === Footer === */
.footer { background: #0f172a; color: #94a3b8; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer h3 { color: #fff; font-family: var(--font-heading); font-size: 1.25rem; margin-bottom: 1rem; }
.footer h4 { color: #fff; font-family: var(--font-heading); font-size: 1rem; margin-bottom: 1rem; }
.footer p { line-height: 1.7; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer a { color: #94a3b8; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* === Back to Top === */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
    border-radius: 50%; background: var(--primary); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition); z-index: 900;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* === Responsive === */
@media (max-width: 1024px) {
    /* Hamburger menu for tablets and below */
    .navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
    .hamburger { display: block; z-index: 10001; position: relative; }
    .navbar-menu {
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh; height: 100dvh;
        background: #fff;
        flex-direction: column; justify-content: flex-start; padding-top: 80px;
        gap: 0; transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000; overflow-y: auto;
    }
    .navbar-menu.active { transform: translateX(0); }
    .navbar-menu li { width: 100%; }
    .navbar-menu a { display: block; padding: 1rem 2rem; font-size: 1.1rem; color: var(--text) !important; }
    .navbar-menu a[class*="btn-"] { color: inherit !important; }
    .navbar-menu a::after { display: none; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { min-height: 70vh; }
    .section { padding: 60px 0; }
    .split { grid-template-columns: 1fr; gap: 2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .section-header { margin-bottom: 2.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .gallery-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem; }
    .card { padding: 1.5rem; }
}
