/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Variables come from Django template :root */
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #333; line-height: 1.6; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar */
.navbar { background: var(--color-dark); color: white; padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; color: white; text-decoration: none; font-size: 1.25rem; font-weight: 700; }
.navbar-brand .logo { height: 2rem; }
.navbar-links { display: flex; align-items: center; gap: 1.5rem; }
.navbar-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.navbar-links a:hover { color: white; }

/* Buttons */
.btn { display: inline-block; padding: 0.6rem 1.5rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: white; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }

/* Hero */
.hero { background: var(--color-dark); color: white; padding: 6rem 0; text-align: center; background-size: cover; background-position: center; position: relative; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-block; background: var(--color-primary); color: white; padding: 0.25rem 1rem; border-radius: 2rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }
.hero h1 em { color: var(--color-secondary); font-style: normal; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 5rem 0; }
.section-gray { background: #f8f9fa; }
.section-eyebrow { display: inline-block; color: var(--color-primary); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 2rem; color: var(--color-dark); }
.section-subtitle { font-size: 1.3rem; color: var(--color-primary); margin: 2rem 0 1rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-image { width: 100%; border-radius: 1rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.service-card { background: white; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: transform 0.2s; }
.service-card:hover { transform: translateY(-4px); }
.service-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 0.5rem; margin-bottom: 1rem; }
.service-card h4, .service-card h3 { margin-bottom: 0.5rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: 0.75rem; overflow: hidden; }
.gallery-item img { width: 100%; height: 250px; object-fit: cover; }
.gallery-large { grid-column: span 2; }
.gallery-large img { height: 350px; }
.gallery-legend { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: white; padding: 0.5rem 1rem; font-size: 0.85rem; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: white; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.testimonial-card .stars { color: var(--color-secondary); font-size: 1.2rem; margin-bottom: 0.75rem; }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; }

/* CTA */
.cta-section { background: var(--color-primary); color: white; text-align: center; }
.cta-section h2 { color: white; }
.cta-section .btn-outline { border-color: white; color: white; }
.cta-section .btn-outline:hover { background: white; color: var(--color-primary); }

/* Forms */
.form { margin-top: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 0.65rem 1rem; border: 1px solid #d1d5db; border-radius: 0.5rem; font-size: 0.95rem; transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.error { color: #dc2626; font-size: 0.85rem; }

/* Alerts */
.alert { padding: 1rem 1.5rem; border-radius: 0.5rem; margin-bottom: 1.5rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* Footer */
.footer { background: var(--color-dark); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; }
.footer h3 { color: white; margin-bottom: 0.75rem; font-size: 1rem; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* Hamburger toggle */
.navbar-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }
.navbar .container { position: relative; }

/* Tablet */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.5rem; }
    .about-grid { gap: 2rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar-toggle { display: block; }
    .navbar-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: -1.5rem;
        right: -1.5rem;
        background: var(--color-dark);
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        z-index: 50;
    }
    .navbar-links.open { display: flex; }
    .navbar-links a { padding: 0.5rem 0; font-size: 1rem; }
    .navbar-links .btn { text-align: center; }

    .hero { padding: 4rem 0; }
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; }

    .section { padding: 3rem 0; }
    .section h2 { font-size: 1.5rem; }

    .about-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-large { grid-column: span 1; }
    .gallery-large img { height: 250px; }
    .gallery-item img { height: 200px; }
    .testimonials-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    .container { padding: 0 1rem; }
    .form-input, .form-textarea, .form-select { font-size: 16px; /* prevent zoom iOS */ }
}

/* Theme toggle button */
.theme-toggle { background: none; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); cursor: pointer; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.9rem; transition: all 0.2s; margin-left: 0.5rem; }
.theme-toggle:hover { background: rgba(255,255,255,0.1); color: white; }

/* Dark mode */
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .section { color: #e2e8f0; }
[data-theme="dark"] .section-gray { background: #1e293b; }
[data-theme="dark"] .section h2 { color: #f1f5f9; }
[data-theme="dark"] .section-subtitle { color: #93c5fd; }
[data-theme="dark"] .section-eyebrow { color: var(--color-primary); }
[data-theme="dark"] .service-card { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .service-card h4 { color: #f1f5f9; }
[data-theme="dark"] .about-grid p { color: #cbd5e1; }
[data-theme="dark"] .gallery-item { background: #1e293b; }
[data-theme="dark"] .gallery-legend { background: rgba(15,23,42,0.8); }
[data-theme="dark"] .testimonial-card { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .testimonial-card p { color: #cbd5e1; }
[data-theme="dark"] .cta-section { background: #1e293b; }
[data-theme="dark"] .footer { background: #020617; }
[data-theme="dark"] .form-input, [data-theme="dark"] .form-textarea, [data-theme="dark"] .form-select { background: #1e293b; color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] .card, [data-theme="dark"] .contact-card { background: #1e293b; color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: #f1f5f9; }

/* System preference dark mode (when theme is "system") */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] body { background: #0f172a; color: #e2e8f0; }
    [data-theme="system"] .section { color: #e2e8f0; }
    [data-theme="system"] .section-gray { background: #1e293b; }
    [data-theme="system"] .section h2 { color: #f1f5f9; }
    [data-theme="system"] .section-subtitle { color: #93c5fd; }
    [data-theme="system"] .service-card { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    [data-theme="system"] .service-card h4 { color: #f1f5f9; }
    [data-theme="system"] .about-grid p { color: #cbd5e1; }
    [data-theme="system"] .gallery-item { background: #1e293b; }
    [data-theme="system"] .testimonial-card { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    [data-theme="system"] .testimonial-card p { color: #cbd5e1; }
    [data-theme="system"] .cta-section { background: #1e293b; }
    [data-theme="system"] .footer { background: #020617; }
    [data-theme="system"] .form-input, [data-theme="system"] .form-textarea, [data-theme="system"] .form-select { background: #1e293b; color: #e2e8f0; border-color: #334155; }
    [data-theme="system"] .card, [data-theme="system"] .contact-card { background: #1e293b; color: #e2e8f0; border-color: #334155; }
    [data-theme="system"] h1, [data-theme="system"] h2, [data-theme="system"] h3, [data-theme="system"] h4 { color: #f1f5f9; }
}
