/* Import fonts already loaded in index.html */

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* Header */
.header {
    background: #0a3a6d;
    color: #fff;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* El logotipo se muestra como una imagen para incorporar la identidad visual */
.logo-img {
    height: 40px;
}

/* Símbolo adicional junto al logotipo */
.logo {
    display: flex;
    align-items: center;
}

.logo-symbol {
    height: 40px;
    margin-right: 0.5rem;
}

/* Texto del logotipo. Usamos texto en lugar de imagen para mantener el logotipo original
   junto con el nuevo símbolo. */
.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}
.nav a {
    margin-left: 1.5rem;
    color: #fff;
    font-weight: 500;
    transition: opacity 0.3s ease;
}
.nav a:hover {
    opacity: 0.7;
}

/* Hero section */
.hero {
    position: relative;
    background-image: url('images/hero.png');
    background-size: cover;
    background-position: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,31,63,0.8) 0%, rgba(4,83,128,0.8) 50%, rgba(28,160,133,0.8) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.hero p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: background 0.3s ease;
}
.btn-primary {
    background: #1ca083;
    color: #fff;
}
.btn-primary:hover {
    background: #158a6f;
}
.btn-secondary {
    background: #f56c40;
    color: #fff;
}
.btn-secondary:hover {
    background: #e05a30;
}

/* CTA section */
.cta-section {
    background: #f5f5f5;
    padding: 3rem 0;
    text-align: center;
}
.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Services */
.services {
    padding: 3rem 0;
    background: #fff;
}
.services h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.service-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px);
}
.service-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
    object-fit: contain;
}
.service-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #0a3a6d;
}
.service-item p {
    font-size: 0.95rem;
    color: #555;
}

/* Why section */
.why {
    padding: 3rem 0;
    background: #f5f5f5;
}
.why h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.why-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.why-item:hover {
    transform: translateY(-5px);
}
.why-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #0a3a6d;
}
.why-item p {
    font-size: 0.9rem;
    color: #555;
}

/* About section */
.about {
    padding: 3rem 0;
}
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.about-text {
    max-width: 800px;
}
.about h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a3a6d;
}
.about p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: #555;
}

/* Carta section */
.carta {
    background: #f5f5f5;
    padding: 3rem 0;
}
.carta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}
.carta-text {
    max-width: 600px;
}
.carta-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a3a6d;
}
.carta-text p {
    font-size: 1.05rem;
    color: #555;
}
.carta-image img {
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
}

/* Contact section */
.contact {
    padding: 3rem 0;
}
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a3a6d;
}
.contact p {
    margin-bottom: 1.5rem;
    color: #555;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-row input {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    font-size: 0.95rem;
}
.contact-form textarea {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    font-size: 0.95rem;
}
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.captcha-row label {
    font-weight: 600;
    font-size: 1rem;
}
.captcha-row input {
    flex: 1;
}
.contact-form button {
    align-self: center;
    margin-top: 0.5rem;
}
.contact-details p {
    margin-top: 0.5rem;
    color: #333;
}
.contact-details a {
    color: #0a3a6d;
    font-weight: 600;
}

/* Legal */
.legal {
    background: #1a1a1a;
    color: #fff;
    padding: 2rem 0;
}
.legal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.legal-content ul {
    list-style: none;
    padding-left: 0;
}
.legal-content li {
    margin-bottom: 0.5rem;
}
.legal-content a {
    color: #fff;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}
.legal-content a:hover {
    opacity: 0.7;
}

/* Footer */
.footer {
    background: #0a3a6d;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}
.footer-content p {
    font-size: 0.9rem;
}

/*
 * Ajustes de menú para pantallas pequeñas. Cuando el ancho de la ventana
 * es igual o inferior a 768 px, el contenedor de navegación pasa a
 * disposición vertical para evitar que el logotipo y los enlaces se
 * superpongan. Además, los enlaces se apilan y se centran para
 * mejorar la legibilidad en dispositivos móviles.
 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
    }
    .nav a {
        margin: 0.25rem 0;
    }
}

/* Estilos para páginas legales (protección de datos, cookies, privacidad, calidad) */
.legal-page {
    padding: 3rem 0;
    background: #f5f5f5;
}
.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a3a6d;
    text-align: center;
}
.legal-page p {
    margin-bottom: 1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}
.legal-page ul {
    max-width: 800px;
    margin: 0 auto;
    list-style: disc;
    padding-left: 1.5rem;
    color: #555;
}
.legal-page li {
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (min-width: 600px) {
    .form-row {
        flex-direction: row;
    }
    .form-row input {
        width: 50%;
    }
    .captcha-row input {
        width: 50%;
    }
    .about-content {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
    .about-text {
        flex: 1;
    }
    .carta-content {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    .carta-text, .carta-image {
        flex: 1;
    }
}