/* ===== CSS Variables ===== */
:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --whatsapp: #25d366;
    --whatsapp-hover: #128c7e;
    --success: #22c55e;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn svg {
    width: 20px;
    height: 20px;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-full {
    width: 100%;
}

/* ===== Section Styles ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-links a {
    color: var(--gray-900);
}

.navbar.scrolled .mobile-menu-btn span {
    background-color: var(--gray-900);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--white);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background-color: var(--accent);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
}

.nav-cta:hover {
    background-color: var(--accent-hover);
    color: var(--white) !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('public/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(30, 58, 95, 0.85), rgba(15, 23, 42, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
    color: var(--white);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== Services Section ===== */
.services {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

.services-category {
    margin-bottom: 3rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.category-title svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.service-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.service-card:hover .service-card-image img {
    transform: scale(1.08);
}

.service-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(30, 58, 95, 0.1);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.service-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.service-icon.emergency {
    background-color: rgba(249, 115, 22, 0.1);
}

.service-icon.emergency svg {
    color: var(--accent);
}

.service-card h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* ===== Why Choose Us ===== */
.why-us {
    padding: 6rem 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    background-color: var(--gray-50);
}

.feature-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

.feature-card h4 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 6rem 0;
    background-color: var(--primary);
}

.how-it-works .section-tag {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.how-it-works .section-header h2 {
    color: var(--white);
}

.how-it-works .section-header p {
    color: var(--gray-300);
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    padding: 2rem;
    max-width: 280px;
    position: relative;
}

.step-number {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background-color: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.step-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 1rem auto 1.5rem;
}

.step-icon svg {
    width: 36px;
    height: 36px;
    color: var(--white);
}

.step h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.9375rem;
    color: var(--gray-300);
}

.step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
}

/* ===== Home Service Section ===== */
.home-service {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

.home-service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.home-service-text .section-tag {
    margin-bottom: 1rem;
}

.home-service-text h2 {
    margin-bottom: 1.5rem;
}

.home-service-text > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.home-service-features {
    margin-bottom: 2rem;
}

.home-service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-weight: 500;
    color: var(--gray-700);
}

.home-service-features svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

.home-service-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.home-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 6rem 0;
    background-color: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--gray-50);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

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

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.testimonial-rating svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h5 {
    font-weight: 600;
    color: var(--gray-900);
}

.testimonial-author span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ===== Contact Section ===== */
.contact {
    padding: 6rem 0;
    background-color: var(--gray-50);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info .section-tag {
    margin-bottom: 1rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.contact-icon.whatsapp {
    background-color: var(--whatsapp);
}

.contact-item h5 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.contact-item a,
.contact-item p {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.contact-item a:hover {
    color: var(--accent);
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
    background-color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error);
}

.error-message {
    font-size: 0.8125rem;
    color: var(--error);
    display: none;
}

.error-message.show {
    display: block;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.show {
    display: block;
}

.form-success svg {
    width: 64px;
    height: 64px;
    color: var(--success);
    margin: 0 auto 1rem;
}

.form-success h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.form-success p {
    color: var(--gray-600);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--gray-900);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.9375rem;
    max-width: 280px;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul a,
.footer ul li {
    color: var(--gray-400);
    font-size: 0.9375rem;
}

.footer ul a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .home-service-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .home-service-image {
        order: -1;
        max-height: 400px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        color: var(--gray-900);
        font-size: 1.125rem;
    }
    
    .hero {
        background-attachment: scroll;
    }
    
    .step-connector {
        display: none;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

/* ===== Mobile Menu Animation ===== */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ===== Overlay for mobile menu ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}
