/* ===== ESTILOS RESPONSIVOS - responsive.css =====
   NOTA: Las variables CSS (:root) están definidas solo en main.css.
   Este archivo solo contiene media queries y estilos complementarios.
*/

/* ===== TABLETS (max 1024px) ===== */
@media (max-width: 1024px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
    h2 { font-size: clamp(1.3rem, 3.5vw, 2.5rem); }
    h3 { font-size: clamp(1.1rem, 3vw,   1.8rem); }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .card {
        padding: 1.5rem;
    }
}

/* ===== MÓVILES (max 768px) ===== */
@media (max-width: 768px) {
    html { font-size: 14px; }
    body { line-height: 1.5; }

    .container { padding: 0 10px; }

    h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        margin-bottom: 0.8rem;
    }
    h2 {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        margin-bottom: 0.7rem;
    }
    h3 {
        font-size: clamp(1rem, 4vw, 1.5rem);
        margin-bottom: 0.6rem;
    }

    p {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
        line-height: 1.6;
    }

    /* Botones */
    .btn {
        display: flex;
        width: 100%;
        max-width: 280px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        margin: 0.5rem auto;
        justify-content: center;
    }

    /* Tarjetas */
    .card {
        padding: 1.2rem;
        margin-bottom: 1rem;
        border-radius: 0.8rem;
    }

    /* Secciones */
    section  { padding: 1.5rem 0; }
    .section { padding: 1.5rem 0; margin-bottom: 1rem; }

    /* Imágenes */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Tablas */
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 1rem 0;
        font-size: 0.9rem;
    }
    th, td {
        padding: 0.8rem;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }
    th { background: var(--light-color); font-weight: 600; }

    /* Formularios */
    form { width: 100%; }

    input, textarea, select {
        width: 100%;
        padding: 0.8rem;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        font-size: 0.95rem;
    }
    input:focus, textarea:focus, select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    /* Grid responsive */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Flexbox responsive */
    .flex-column-mobile {
        flex-direction: column;
    }

    /* Hero */
    .hero {
        min-height: 50vh;
        padding: 1.5rem 1rem;
    }
    .hero h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); }
    .hero p  { font-size: clamp(0.9rem, 2.5vw, 1.1rem); }

    /* Servicios */
    .services        { padding: 2rem 0; }
    .services-grid   { grid-template-columns: 1fr; gap: 1.5rem; }

    /* Contacto */
    .contact         { padding: 2rem 0; }
    .contact-info    { grid-template-columns: 1fr; gap: 1rem; }

    /* Sobre nosotros */
    .about        { padding: 2rem 0; }
    .about-content { font-size: 0.95rem; line-height: 1.6; }
}

/* ===== MÓVILES PEQUEÑOS (max 480px) ===== */
@media (max-width: 480px) {
    html { font-size: 13px; }
    body { line-height: 1.4; }

    .container { padding: 0 8px; }

    h1 { font-size: clamp(1.3rem, 7vw, 2rem); }
    h2 { font-size: clamp(1.1rem, 6vw, 1.6rem); }
    h3 { font-size: clamp(0.95rem, 5vw, 1.4rem); }

    p { font-size: 0.9rem; margin-bottom: 0.6rem; }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        max-width: 250px;
    }

    .card { padding: 1rem; margin-bottom: 0.8rem; }

    section { padding: 1rem 0; }

    input, textarea, select { padding: 0.6rem; font-size: 0.9rem; }
    th, td { padding: 0.6rem; font-size: 0.85rem; }
}

/* ===== HERO ===== */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; color: white; }
.hero p  { font-size: clamp(1rem, 2.5vw, 1.3rem); max-width: 600px; margin: 0 auto; opacity: 0.9; }

/* ===== SERVICIOS ===== */
.services { padding: 4rem 0; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== CONTACTO ===== */
.contact { padding: 4rem 0; }
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ===== SOBRE NOSOTROS ===== */
.about { padding: 4rem 0; }
.about-content { max-width: 800px; margin: 0 auto; line-height: 1.8; }

/* ===== GRID & FLEX HELPERS ===== */
.grid   { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex         { display: flex; }
.flex-column  { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-center  { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }

/* ===== SPACING UTILITIES ===== */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }

/* ===== TEXT UTILITIES ===== */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-justify { text-align: justify; }

/* ===== VISIBILITY ===== */
.hidden { display: none; }
.visible { display: block; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.fade-in-up   { animation: fadeInUp   0.6s ease-out; }
.slide-in-left{ animation: slideInLeft 0.6s ease-out; }
.pulse        { animation: pulse      2s infinite; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar        { width: 8px; }
::-webkit-scrollbar-track  { background: var(--light-color); }
::-webkit-scrollbar-thumb  { background: var(--primary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

/* Reduce animaciones en móviles para mejor rendimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
