@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');

/* Basic Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Navigation */

.nav-links {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Remove margin for nav list items */
.nav-links li {
    margin-bottom: 0;

}

.error-message {
    color: #ff6961;
    font-weight: bold;
    margin-top: 10px;
}


/* Center nav link text vertically */
.nav-links li a {
    display: flex;
    align-items: center;
    height: 100%;
}

header {
    background: #003366;
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0; /* remove default h1 margins */
    line-height: 1;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px; /* ensures enough height for vertical centering */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

nav a.active,
nav a:hover {
    text-decoration: underline;
}

/* Language selector */
.lang-select {
    margin-left: auto;
    background: #1d3264;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

#nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
}

/* Hero Section */
.hero {
    position: relative;
    color: #fff;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Services */
.services {
    padding: 60px 0;
    text-align: center;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #003366;
}

/* Map Section */
.map-section {
    width: 100%;
    padding: 40px 0;
    margin: 0;
    text-align: center;
}

.map-container {
    width: 100%;
    overflow: hidden;
}

.map-container .map-iframe {
    margin-top: -150px;
}

.map-iframe {
    display: block;
    border: none;
    width: 100%;
    height: 600px;
}

.map-img {
    max-width: 100%;
    height: auto;
    border: 2px solid #003366;
    border-radius: 8px;
}

/* Service Card Backgrounds */
.card.carretera,
.card.taller,
.card.grua,
.card.neumaticos,
.card.talleres,
.card.repatriacion,
.card.trailers,
.card.agricola {
    position: relative;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.card.carretera { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/service_accidente.webp'); }
.card.taller { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/service_garaje.webp'); }
.card.grua { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/towing_service_default.webp'); }
.card.neumaticos { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/pinchazo.webp'); }
.card.talleres { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/service_especial.webp'); }
.card.repatriacion { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/puerto.webp'); }
.card.trailers { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/caravanas.webp'); }
.card.agricola { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/service_especial.webp'); }

.card.carretera h3,
.card.taller h3,
.card.grua h3,
.card.neumaticos h3,
.card.talleres h3,
.card.repatriacion h3,
.card.trailers h3,
.card.agricola h3,
.card.carretera p,
.card.taller p,
.card.grua p,
.card.neumaticos p,
.card.talleres p,
.card.repatriacion p,
.card.trailers p,
.card.agricola p { color: #fff; }

/* Coverage */
.coverage {
    padding: 40px 0;
    text-align: center;
}

/* Global spacing tweaks */
section.container, .container section, .contact, .careers, .about {
    padding: 60px 0;
}

h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 28px;
    margin-bottom: 15px;
}


p, ul, li {
    margin-bottom: 15px;
}

.header-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 20px;
}

/* Contact Page */
.contact-list {
    list-style: none;
    margin: 20px 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-primary {
    background: #003366;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary:hover {
    background: #00204d;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.cta-buttons .btn-primary {
    background: #00204d;
}

/* Footer navigation */
.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-nav a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

/* Page headers */
.page-header h2 {
    margin-top: 40px;
}

/* Responsive grids */
@media (max-width: 768px) {
    .info-grid, .work-grid {
        grid-template-columns: 1fr;
    }
}

/* Info & Work Grids */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

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

/* Footer */
footer {
    margin-top: 60px;
    background: #003366;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    /* hide nav links by default on mobile */
    .nav-links {
        flex-direction: column;
        background: #003366;
        position: absolute;
        top: 60px;
        right: 0;
        width: 220px;
        display: none;
        padding: 10px 0;
        z-index: 1000;
    }

    .nav-links.show {
        display: flex;
    }

    /* Mobile language selector */
    .lang-select {
        margin: 10px 0 0 10px;
        color: #fff;
    }

    #nav-toggle {
        display: block;
        cursor: pointer;
    }
}

/* End Responsive Navigation */
@media (max-width: 768px) {


    /* Mobile language selector */
    .lang-select {
        margin: 10px 0 0 10px;
        color: #fff;
    }

    #nav-toggle {
        display: block;
        cursor: pointer;
    }
}
