/* ===== CSS Variables ===== */
:root {
    --primary: #3563E9;
    --primary-dark: #2B4FBF;
    --primary-light: #EBF0FF;
    --dark: #191D31;
    --text: #3D4461;
    --text-light: #6B7280;
    --bg: #ffffff;
    --bg-alt: #F7F8FA;
    --border: #E5E7EB;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.07);
}

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

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--dark);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

.section {
    padding: 80px 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== Section Headers ===== */
.section-label {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
    text-align: center;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-divider {
    width: 48px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 99, 233, 0.3);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: white;
    box-shadow: var(--shadow-md);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    transition: color 0.3s;
}

.navbar.scrolled .nav-logo {
    color: var(--dark);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s;
}

.navbar.scrolled .nav-links a {
    color: var(--text);
}

.nav-links a:hover {
    color: white;
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary) !important;
    color: white !important;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar.scrolled .mobile-toggle span {
    background: var(--dark);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(25, 29, 49, 0.85) 0%, rgba(53, 99, 233, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 24px 80px;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 28px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.text-accent {
    color: var(--primary);
    background: linear-gradient(135deg, #5B8DEF, #3563E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-trust {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.trust-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

.trust-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
}

.trust-item span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

/* ===== Services ===== */
.services-section {
    background: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-icon.electrical {
    background: #FEF3C7;
    color: #D97706;
}

.service-icon.painting {
    background: #FCE7F3;
    color: #DB2777;
}

.service-icon.carpentry {
    background: #DBEAFE;
    color: #2563EB;
}

.service-icon.home {
    background: #D1FAE5;
    color: #059669;
}

.service-icon.construction {
    background: #FEE2E2;
    color: #DC2626;
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== About ===== */
.about-section {
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-lg);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary);
    color: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 8px 24px rgba(53, 99, 233, 0.3);
}

.exp-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-content .section-label {
    text-align: left;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.about-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Gallery ===== */
.gallery-section {
    background: var(--bg-alt);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.gallery-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(25, 29, 49, 0.85));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 8px;
    width: fit-content;
}

.gallery-overlay p {
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
}

/* ===== Testimonials ===== */
.testimonials-section {
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.testimonial-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.stars i {
    color: var(--accent);
    font-size: 0.875rem;
}

.testimonial-card p {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--dark);
}

.testimonial-author span {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.review-cta {
    text-align: center;
    margin-top: 40px;
}

/* ===== Contact ===== */
.contact-section {
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info-side .section-label {
    text-align: left;
}

.contact-info-side h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.contact-info-side > p {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.contact-detail strong {
    display: block;
    font-size: 0.875rem;
    color: var(--dark);
}

.contact-detail a,
.contact-detail span {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.contact-detail a:hover {
    color: var(--primary);
}

/* Contact Form */
.form-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--dark);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(53, 99, 233, 0.1);
}

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

.form-card .btn {
    margin-top: 16px;
}

.form-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.form-note i {
    font-size: 0.75rem;
}

/* Emergency Note (inside contact) */
.emergency-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 14px 18px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.5;
}

.emergency-note i {
    color: #DC2626;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.emergency-note a {
    color: #DC2626;
    font-weight: 600;
}

/* ===== Footer ===== */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: white;
    font-weight: 700;
    font-size: 1.0625rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-links-col h4 {
    color: white;
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links-col ul {
    list-style: none;
}

.footer-links-col li {
    font-size: 0.875rem;
    padding: 4px 0;
    color: rgba(255,255,255,0.6);
}

.footer-links-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links-col a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
}

.footer-badges {
    display: flex;
    gap: 12px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    text-align: center;
    padding: 32px 32px 16px;
}

.modal-header i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 12px;
}

.modal-header h3 {
    font-size: 1.375rem;
    color: var(--dark);
    font-weight: 700;
}

.modal-body {
    padding: 0 32px 24px;
    text-align: center;
}

.modal-body p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-body a {
    color: var(--primary);
    font-weight: 600;
}

.modal-footer {
    padding: 0 32px 32px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .services-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        gap: 40px;
    }

    .hero h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 56px 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 20px;
        box-shadow: -4px 0 16px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text) !important;
        font-size: 1.0625rem;
    }

    .nav-cta {
        text-align: center;
        width: 100%;
        display: block !important;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 100px 24px 60px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        justify-content: center;
    }

    .hero-trust {
        flex-direction: column;
        gap: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image {
        order: -1;
    }

    .about-content .section-label {
        text-align: center;
    }

    .about-content h2 {
        text-align: center;
    }

    .about-content .btn {
        align-self: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info-side .section-label,
    .contact-info-side h2 {
        text-align: center;
    }

    .contact-info-side > p {
        text-align: center;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-badges {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .experience-badge {
        right: 16px;
        bottom: -16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content {
        padding: 90px 16px 48px;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* prevent iOS zoom */
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.875rem;
    }
}
