/* =====================================================
   RESPONSIVE.CSS - Todas las media queries unificadas
   Cool Corporate
   Breakpoints: 1400px / 1200px / 992px / 768px / 480px
   ===================================================== */

/* ===== PANTALLAS MUY ANCHAS (1400px+) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== TABLET GRANDE (1200px) ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }

    .nav-menu {
        gap: 20px;
    }

    .service-detail-grid {
        gap: 50px;
    }
}

/* ===== TABLET (992px) ===== */
@media (max-width: 992px) {
    /* --- Navegación: menú lateral --- */
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: 20px;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* --- Submenú en móvil --- */
    .has-submenu {
        width: 100%;
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: var(--gray-light);
        border-radius: var(--radius);
        margin-top: 8px;
        min-width: 100%;
        padding: 5px 0;
    }

    .has-submenu.open .submenu {
        display: block;
    }

    .submenu li a {
        padding: 10px 20px;
    }

    /* --- Home: portfolio grid --- */
    .portfolio-grid {
        grid-template-columns: 1fr 1fr 1f;
        grid-template-rows: auto;
    }

    .portfolio-item.large {
        grid-row: span 1;
        grid-column: span 2;
    }

    /* --- Footer --- */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Servicios / Sectores / Misión --- */
    .service-detail-grid,
    .service-detail-grid.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-detail-grid.reverse > * {
        direction: ltr;
    }

    .service-detail-image {
        height: 400px;
    }

    .service-detail-image img.secondary {
        position: relative;
        bottom: auto;
        right: auto;
        width: 70%;
        margin: -50px auto 0;
        display: block;
    }

    /* --- Contacto --- */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-container {
        padding: 35px 25px;
    }

    /* --- Sobre mí / Misión-Visión --- */
    .about-intro-grid,
    .vision-grid,
    .cta-personal {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-badge {
        bottom: -20px;
        right: 20px;
        width: 120px;
        height: 120px;
    }

    .badge-number {
        font-size: 2.2rem;
    }

    /* --- Timeline --- */
    .timeline::before {
        left: 30px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 70px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-content {
        margin: 0;
        max-width: 100%;
    }
}

/* ===== MÓVIL GRANDE (768px) ===== */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* --- Hero home --- */
    .hero {
        min-height: 500px;
    }

    /* >>> NUEVO: HERO EN MÓVIL CON FOTO VERTICAL <<< */
    .hero-background {
        background-image: url('../img/hero/hero-bg-mobile.png') !important;
        background-position: center top;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .btn-large {
        padding: 16px 30px;
        font-size: 15px;
    }

    /* --- Page heroes --- */
    .page-hero,
    .page-hero-short {
        height: 50vh;
        min-height: 350px;
    }

    .page-hero-bg {
        background-attachment: scroll;
    }

    .about-hero {
        height: 60vh;
        min-height: 400px;
    }

    .about-quote {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* --- Stats --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* --- Proceso --- */
    .process-step {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
    }

    /* --- Portfolio --- */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item.large {
        grid-column: span 1;
    }

    .portfolio-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    /* --- Formularios --- */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
    }

    .radio-label,
    .checkbox-label {
        width: 100%;
    }

    /* --- Modal --- */
    .modal-content {
        padding: 30px 20px;
    }

    .modal-specs {
        grid-template-columns: 1fr;
    }

    .modal-project .modal-image {
        height: 220px;
    }

    /* --- Decálogo --- */
    .dec-item {
        padding: 25px;
    }

    /* --- Sobre mí CTA --- */
    .cta-personal {
        padding: 30px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Footer --- */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-links {
        justify-content: center;
    }

    /* --- Mapa --- */
    .map-section {
        height: 350px;
    }
}

/* ===== MÓVIL PEQUEÑO (480px) ===== */
@media (max-width: 480px) {
    /* --- Header --- */
    .lang-switcher {
        display: none;
    }

    .logo img {
        height: 40px;
    }

    /* --- Tipografías --- */
    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-name {
        font-size: 2.5rem;
    }

    /* --- Paddings reducidos --- */
    .about-intro,
    .about-timeline,
    .about-values,
    .about-vision,
    .about-team,
    .about-achievements,
    .about-media,
    .about-cta,
    .service-detail,
    .contact-section,
    .portfolio-section,
    .faq-section,
    .dec-section {
        padding: 60px 0;
    }

    .form-container {
        padding: 25px 20px;
    }

    .service-detail-image {
        height: 300px;
    }

    .service-detail-content {
        padding: 0 5px;
    }

    /* --- Stats --- */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* --- Tarjetas --- */
    .service-card,
    .testimonial-card,
    .value-card {
        padding: 30px 20px;
    }

    .timeline-content {
        padding: 20px;
    }

    .dec-item {
        flex-direction: column;
        gap: 10px;
        padding: 25px 20px;
    }

    .dec-number {
        font-size: 2rem;
        min-width: auto;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-answer p {
        padding: 0 20px 20px;
    }
}

/* ===== ACCESIBILIDAD: reducir movimiento ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}