:root {
    --primary: #438f4d; /* Muted green */
    --primary-glow: rgba(67, 143, 77, 0.1); /* Very subtle */
    --secondary: #2e7d32;
    --dark-bg: #121412; /* Less blue, more neutral dark */
    --panel-bg: rgba(20, 24, 20, 0.75);
    --panel-border: rgba(255, 255, 255, 0.05);
    --text-main: #e0e5e0;
    --text-muted: #8c968c;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
}

/* Background overlay using the generated image */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../public/imagenes/bg_subdued.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.25; /* More subdued */
    filter: blur(2px); /* Less blur to show texture */
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 15, 22, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--panel-border);
}

.logo-container .logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
}

.logo-container .logo span {
    color: var(--primary);
}

.logo-container .subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pulse-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.phone-link {
    font-family: var(--font-heading);
    font-size: 2.5rem; /* Make phone very big */
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    text-shadow: 0 0 5px var(--primary-glow);
    transition: all 0.3s ease;
}

.phone-link:hover {
    color: #fff;
    transform: scale(1.05);
}

.phone-numbers {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-separator {
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 300;
}

.mobile-link {
    font-size: 2rem; /* slightly smaller than landline */
    color: var(--secondary);
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80vh;
    padding: 0 5%;
    gap: 40px;
}

.hero-content {
    flex: 1;
    padding: 40px;
    animation: slideInLeft 1s ease-out forwards;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-title span {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s ease-out forwards;
}

.floating-truck {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Services Section */
.services-section {
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 30px;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.2);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Legacy Section */
.legacy-section {
    display: flex;
    align-items: center;
    margin: 50px 5%;
    padding: 50px;
    gap: 40px;
}

.legacy-content {
    flex: 1;
}

.legacy-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.legacy-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.email-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

.email-link:hover {
    text-decoration: underline;
}

.contact-box {
    margin-top: 30px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    text-align: left;
}

.contact-box h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.contact-box p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.contact-form {
    display: flex;
    gap: 10px;
}

.contact-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus {
    border-color: var(--primary);
}

.contact-form button {
    padding: 12px 25px;
    font-size: 1rem;
}

.legacy-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.old-truck {
    max-width: 100%;
    border-radius: 10px;
    filter: sepia(0.3) brightness(0.8);
    transition: all 0.5s ease;
}

.old-truck:hover {
    filter: sepia(0) brightness(1.1);
    transform: scale(1.05);
}

/* Footer & Modal */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--panel-border);
    margin-top: 50px;
}

.legal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    margin-top: 10px;
    font-family: var(--font-body);
}

.legal-btn:hover {
    color: #fff;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    padding: 40px;
    max-width: 600px;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .hero, .legacy-section {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .contact-box {
        text-align: center;
    }

    .phone-numbers {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }

    .phone-separator {
        display: none;
    }

    .phone-link {
        font-size: 1.8rem;
    }
    
    .mobile-link {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .phone-numbers {
        align-items: center;
    }

    .phone-link {
        font-size: 1.6rem;
    }
    
    .mobile-link {
        font-size: 1.4rem;
    }
    
    .logo-container .logo {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .contact-form {
        flex-direction: column;
    }
}
