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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0f172a; /* azul oscuro elegante */
    color: #e5e7eb;      /* gris claro */
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --------- HERO --------- */
.hero {
    background: radial-gradient(circle at top left, #38bdf8 0, #0f172a 40%, #020617 100%);
    color: #f9fafb;
    padding: 18px 0 64px;
}

/* NAVBAR */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.btn-nav {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    background: #0ea5e9;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
}

/* HERO CONTENT */
.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.hero-text h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-text p {
    font-size: 1rem;
    color: #cbd5f5;
    margin-bottom: 20px;
    max-width: 480px;
}

.btn-primary {
    display: inline-block;
    background: #22c55e;
    color: #052e16;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
}

/* Tarjeta del hero */
.hero-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    backdrop-filter: blur(10px);
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #93c5fd;
}

.hero-card h3 {
    margin-top: 8px;
    font-size: 1.1rem;
}

.hero-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 12px;
    color: #38bdf8;
}

.hero-note {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #cbd5f5;
}

/* --------- SECCIONES --------- */
.section {
    padding: 60px 0;
    background: #020617;
    color: #e5e7eb;
}

.section-alt {
    background: #020617;
    border-top: 1px solid #111827;
    border-bottom: 1px solid #111827;
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #9ca3af;
    max-width: 520px;
    margin-bottom: 28px;
}

/* GRID */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* --------- CARDS --------- */
.card {
    background: #020617;
    border-radius: 18px;
    border: 1px solid #111827;
    padding-bottom: 18px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block; /* Ensures no bottom gap */
}

.card h3 {
    font-size: 1.1rem;
    margin: 16px 16px 8px;
}

.card p {
    font-size: 0.92rem;
    color: #9ca3af;
    margin: 0 16px 10px;
}

.card-list {
    list-style: none;
    padding: 0 16px 10px;
    font-size: 0.9rem;
    color: #d1d5db;
}

.card-list li::before {
    content: "• ";
    color: #38bdf8;
}

/* Cards pequeñas */
.card-min {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #111827;
    padding: 16px;
}

.card-min h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.card-min p {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* --------- GALERÍA --------- */
.gallery-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.gallery-item {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* --------- COTIZADOR --------- */
.cotizador {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: flex-start;
}

.quote-form {
    background: #020617;
    border-radius: 18px;
    border: 1px solid #111827;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 10px;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.quote-form textarea {
    min-height: 90px;
    resize: vertical;
}

.full-width {
    width: 100%;
    text-align: center;
}

/* --------- FOOTER --------- */
.footer {
    background: #020617;
    padding: 24px 0 12px;
    border-top: 1px solid #111827;
    color: #9ca3af;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.footer a {
    color: #38bdf8;
    text-decoration: none;
}

.footer-copy {
    text-align: center;
    color: #6b7280;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-card {
        margin-top: 8px;
    }

    .cotizador {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
}



/* --- Estilos para la Calculadora de Piscinas --- */

.calculator-box {
    margin-top: 3rem; /* Espacio de separación de los cuadros de arriba */
    padding: 2rem;
    background-color: #3f51b5; /* Fondo azul, ajusta si tienes otro color principal */
    color: #ffffff; /* Letras blancas para contraste */
    border-radius: 8px;
    text-align: center;
    /* Para que ocupe casi todo el ancho con un pequeño margen */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.calculator-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Estilo para el botón secundario (btn-secondary) que usamos en la caja */
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #ff9800; /* Color de acento (naranja) */
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none; /* Asegura que no tenga borde por defecto */
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #f57c00;
}


/* =======================================================
   ESTILOS DE LA CALCULADORA FUNCIONAL (DARK MODE)
   ======================================================= */

/* 1. Contenedor Principal de la Calculadora */
.calculator-form-section {
    margin-top: 4rem;
    padding: 2.5rem 2rem;
    background-color: #020617; /* Fondo oscuro igual al resto de secciones */
    border: 1px solid #1e293b; /* Borde sutil */
    border-radius: 20px;
    color: #e5e7eb;
}

/* Centrar textos de cabecera de esta sección */
.calculator-form-section .section-title,
.calculator-form-section .section-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* 2. El Formulario (Grid Flexible) */
.calculator-form-section .quote-form {
    max-width: 700px;
    margin: 2rem auto 0;
    /* Usamos Flexbox para acomodar los inputs */
    display: flex;
    flex-wrap: wrap; /* Permite que bajen a la siguiente linea */
    gap: 15px;

    /* Reseteamos estilos heredados */
    background: transparent;
    border: none;
    padding: 0;
}

/* 3. Títulos internos (h4) */
.calculator-form-section h4 {
    width: 100%; /* Ocupa toda la fila */
    text-align: center;
    color: #38bdf8; /* Azul claro */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. Estilo de Inputs y Selects */
.calculator-form-section input[type="number"],
.calculator-form-section select {
    flex: 1 1 30%; /* Intentan ocupar 1/3 del ancho */
    min-width: 180px; /* Tamaño mínimo para no verse aplastados en móviles */

    background: #0f172a; /* Fondo azul muy oscuro */
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.calculator-form-section input:focus,
.calculator-form-section select:focus {
    border-color: #38bdf8; /* Borde azul al escribir */
}

/* Contenedor especial para dimensiones (Largo, Ancho, Diametro) */
.campos-dimensiones {
    display: flex;
    gap: 15px;
    width: 100%; /* Ocupa toda la fila */
}

.campos-dimensiones input {
    flex: 1; /* Se reparten el espacio equitativamente */
}

/* 5. Botón de Calcular */
.calculator-form-section button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 14px;
    font-size: 1.1rem;
}

/* 6. Caja de Resultados */
.calculator-results {
    max-width: 700px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background-color: #1e293b; /* Gris azulado para destacar del fondo negro */
    border-radius: 12px;
    border-left: 6px solid #38bdf8; /* Línea de acento a la izquierda */
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.calculator-results strong {
    color: #38bdf8;
    font-weight: 700;
}

.calculator-results h4 {
    text-align: left; /* Títulos dentro de resultados a la izquierda */
    margin-top: 1rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 5px;
}




