/* ------------------------------------------------------------------
   IMPORTACIÓN DE FUENTES Y RESET
------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,600;14..32,700&display=swap');

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

/* ------------------------------------------------------------------
   VARIABLES GLOBALES
------------------------------------------------------------------ */
:root {
    --primary: #0A66C2;
    --primary-dark: #084a8f;
    --primary-light: #E8F1FA;
    --accent: #00A8E8;
    --accent-hover: #0095cf;
    --gray-100: #F8FAFC;
    --gray-200: #E2E8F0;
    --gray-600: #475569;
    --gray-800: #1E293B;
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 20px 25px -12px rgba(0, 0, 0, 0.08);
    --radius: 24px;
    --radius-sm: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* ------------------------------------------------------------------
   HEADER (sticky con blur)
------------------------------------------------------------------ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 15px;
}

header a img {
    height: 50px;
    transition: transform 0.2s ease;
}

header a img:hover {
    transform: scale(1.02);
}

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.bar-boton {
    padding: 8px 16px;
    background-color: transparent;
    color: var(--gray-800);
    font-weight: 600;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.bar-boton:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* ------------------------------------------------------------------
   HERO (BIENVENIDA)
------------------------------------------------------------------ */
.hero {
    background: linear-gradient(rgba(10, 102, 194, 0.6), rgba(0, 0, 0, 0.5)), url('Img/Entrada.jpg');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero-content h2 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin-bottom: 2rem;
    text-wrap: balance;
}

/* ------------------------------------------------------------------
   BOTONES PRINCIPALES
------------------------------------------------------------------ */
.cta-button,
.serv-button,
input[type="submit"] {
    display: inline-block;
    padding: 12px 28px;
    background-color: white;
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cta-button:hover,
.serv-button:hover,
input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    background-color: var(--gray-100);
}

.section-buttons {
    text-align: center;
    padding: 20px 10%;
}

/* ------------------------------------------------------------------
   SECCIÓN DE TEXTO INTRODUCTORIO
------------------------------------------------------------------ */
.intro-text {
    text-align: center;
    padding: 40px 5%;
}

.intro-text h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.intro-text p {
    color: var(--gray-600);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ------------------------------------------------------------------
   SECCIÓN DE DOS COLUMNAS (QUIÉNES SOMOS)
------------------------------------------------------------------ */
.two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 3rem 5%;
    align-items: center;
    background-color: white;
}

.column-one {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.column-one img {
    width: 100%;
    max-width: 350px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.column-one img:hover {
    transform: scale(1.02);
}

.column-two {
    flex: 1.5;
    min-width: 280px;
}

.column-two h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    text-align: left;
    margin: 1.5rem 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.column-two h2:first-of-type {
    margin-top: 0;
}

.column-two p {
    color: var(--gray-600);
    line-height: 1.6;
    text-align: justify;
}

/* ------------------------------------------------------------------
   GALERÍA DE IMÁGENES (RESPONSIVE)
------------------------------------------------------------------ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 5%;
    background-color: var(--gray-100);
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

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

/* ------------------------------------------------------------------
   TARJETAS DE SERVICIOS (GRID RESPONSIVE)
------------------------------------------------------------------ */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 5% 4rem;
}

.service-card {
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

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

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

.service-card div {
    padding: 1.5rem;
}

.service-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

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

/* ------------------------------------------------------------------
   FORMULARIO DE CONTACTO
------------------------------------------------------------------ */
form {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
    color: var(--gray-800);
}

input,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background-color: white;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

/* ------------------------------------------------------------------
   FOOTER RESPONSIVE
------------------------------------------------------------------ */
footer {
    background-color: white;
    padding: 3rem 5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 2rem;
}

.columna {
    flex: 1;
    min-width: 200px;
}

.columna img {
    height: 45px;
    margin-bottom: 1rem;
}

.columna h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.columna ul,
.columna li {
    list-style: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.g-boton,
.c-button {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: inline-block;
    margin: 0.25rem 0;
    word-break: break-word;
}

.g-boton:hover,
.c-button:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.social a img {
    width: 32px;
    height: 32px;
    transition: transform 0.2s;
}

.social a:hover img {
    transform: translateY(-3px);
}

/* ------------------------------------------------------------------
   UTILIDADES (Contacto)
------------------------------------------------------------------ */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 5%;
    margin-bottom: 3rem;
}

.form-container,
.map-container,
.info-sidebar {
    flex: 1;
    min-width: 280px;
}

.map-container iframe {
    width: 100%;
    border-radius: var(--radius);
    height: 350px;
}

/* ------------------------------------------------------------------
   RESPONSIVE (MÓVILES Y TABLETS)
------------------------------------------------------------------ */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    nav {
        justify-content: center;
    }

    .two-columns {
        flex-direction: column;
        padding: 2rem 5%;
        text-align: center;
    }

    .column-two h2 {
        text-align: center;
    }
    
    .column-two p {
        text-align: center;
    }

    .hero {
        min-height: 60vh;
        background-attachment: scroll;
    }

    .servicios-grid,
    .gallery {
        grid-template-columns: 1fr; /* En móvil, 1 columna */
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }

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

    .columna h3 {
        text-align: center;
    }
    
    .columna ul li {
        text-align: center;
    }

    .social {
        justify-content: center;
    }
    
    .container {
        flex-direction: column;
        padding: 0 5%;
    }
}

/* Para tablets pequeñas (entre 769px y 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}