/* ============================================
   PVC IDEAS - ESTILOS RESPONSIVOS
============================================= */

/* ============================================
   PANTALLAS GRANDES (max-width: 1200px)
============================================= */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    /* Servicios - 2 columnas */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Galería - 2 columnas */
    .gallery-preview__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   TABLET (max-width: 992px)
============================================= */
@media screen and (max-width: 992px) {
    :root {
        --font-size-5xl: 3rem;
        --font-size-4xl: 2.5rem;
        --font-size-3xl: 2rem;
    }

    .container {
        max-width: 720px;
        padding: 0 var(--spacing-xl);
    }

    /* Features - Una columna */
    .features__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .features__text {
        text-align: center;
    }

    .features__text .section__subtitle,
    .features__text .section__title,
    .features__text .section__description {
        text-align: center;
    }

    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer - 2 columnas */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }

    .footer__brand {
        grid-column: span 2;
        text-align: center;
    }

    .footer__logo {
        display: block;
        margin: 0 auto var(--spacing-lg);
    }

    .footer__social {
        justify-content: center;
    }
}

/* ============================================
   TABLET PEQUEÑA (max-width: 768px)
============================================= */
@media screen and (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --header-height: 70px;
        --spacing-4xl: 4rem;
    }

    section {
        padding: var(--spacing-3xl) 0;
    }

    /* ========== NAVEGACIÓN MÓVIL ========== */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--color-primary);
        padding: var(--spacing-4xl) var(--spacing-xl) var(--spacing-xl);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        z-index: calc(var(--z-header) + 10);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-lg);
    }

    .nav__link {
        font-size: var(--font-size-lg);
        color: rgba(255, 255, 255, 0.85);
    }

    .nav__link.active,
    .nav__link:hover {
        color: var(--color-bg);
    }

    .nav__link--cta {
        margin-top: var(--spacing-md);
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Botón cerrar menú */
    .nav__close {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 40px;
        height: 40px;
        cursor: pointer;
        z-index: 10;
    }

    .nav__close span {
        position: absolute;
        background-color: var(--color-bg);
    }

    .nav__close span:first-child {
        transform: rotate(45deg);
    }

    .nav__close span:last-child {
        transform: rotate(-45deg);
    }

    /* Botón hamburguesa */
    .nav__toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 10;
    }

    .nav__toggle span {
        background-color: var(--color-bg);
    }

    /* ========== HERO ========== */
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--spacing-3xl)) 0 var(--spacing-3xl);
    }

    .hero__text {
        max-width: 100%;
    }

    .hero__title {
        font-size: var(--font-size-4xl);
    }

    .hero__description {
        font-size: var(--font-size-base);
    }

    .hero__buttons {
        flex-direction: column;
    }

    .hero__buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__shapes {
        display: none;
    }

    .hero__scroll {
        display: none;
    }

    /* ========== SERVICIOS ========== */
    .services__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .service-card {
        padding: var(--spacing-xl);
    }

    /* ========== FEATURES ========== */
    .features__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* ========== GALERÍA ========== */
    .gallery-preview__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    /* ========== CTA SECTION ========== */
    .cta-section__title {
        font-size: var(--font-size-2xl);
    }

    .cta-section__buttons {
        flex-direction: column;
    }

    .cta-section__buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* ========== FOOTER ========== */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }

    .footer__brand {
        grid-column: auto;
    }

    .footer__contact-list li {
        justify-content: center;
    }

    .footer__list a::before {
        display: none;
    }

    /* ========== WHATSAPP BUTTON ========== */
    .whatsapp-float {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 55px;
        height: 55px;
    }

    .whatsapp-float__tooltip {
        display: none;
    }
}

/* ============================================
   MÓVIL (max-width: 576px)
============================================= */
@media screen and (max-width: 576px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --header-height: 60px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    /* Header */
    .nav__logo-img {
        height: 120px;
    }

    .header.scrolled .nav__logo-img {
        height: 45px;
    }

    /* Hero */
    .hero {
        padding: calc(var(--header-height) + var(--spacing-2xl)) 0 var(--spacing-2xl);
    }

    .hero__subtitle {
        font-size: var(--font-size-xs);
        letter-spacing: 2px;
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .hero__description {
        font-size: var(--font-size-sm);
    }

    /* Secciones */
    section {
        padding: var(--spacing-2xl) 0;
    }

    .section__header {
        margin-bottom: var(--spacing-2xl);
    }

    .section__title {
        font-size: var(--font-size-2xl);
    }

    .section__description {
        font-size: var(--font-size-sm);
    }

    /* Service Cards */
    .service-card {
        padding: var(--spacing-lg);
    }

    .service-card__icon {
        width: 60px;
        height: 60px;
    }

    .service-card__icon svg {
        width: 32px;
        height: 32px;
    }

    .service-card__title {
        font-size: var(--font-size-base);
    }

    /* Feature Items */
    .feature-item {
        padding: var(--spacing-md);
    }

    .feature-item__number {
        font-size: var(--font-size-xl);
    }

    .feature-item__title {
        font-size: var(--font-size-sm);
    }

    .feature-item__text {
        font-size: var(--font-size-xs);
    }

    /* Galería */
    .gallery-preview__grid {
        gap: var(--spacing-sm);
    }

    /* Botones */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-xs);
    }

    /* CTA Section */
    .cta-section {
        padding: var(--spacing-3xl) 0;
    }

    .cta-section__title {
        font-size: var(--font-size-xl);
    }

    .cta-section__text {
        font-size: var(--font-size-sm);
    }

    /* Footer */
    .footer {
        padding: var(--spacing-3xl) 0 var(--spacing-lg);
    }

    .footer__logo img {
        height: 80px;
    }

    .footer__title {
        font-size: var(--font-size-sm);
    }

    .footer__description,
    .footer__list a,
    .footer__contact-list li {
        font-size: var(--font-size-xs);
    }

    /* WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   MÓVIL PEQUEÑO (max-width: 400px)
============================================= */
@media screen and (max-width: 400px) {
    :root {
        --font-size-3xl: 1.35rem;
        --font-size-2xl: 1.15rem;
    }

    .nav__logo-img {
        height: 100px;
    }

    .hero__title {
        font-size: var(--font-size-2xl);
    }

    /* Galería - 1 columna */
    .gallery-preview__grid {
        grid-template-columns: 1fr;
    }

    /* Feature items en columna */
    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-item__number {
        margin-bottom: var(--spacing-sm);
    }
}

/* ============================================
   LANDSCAPE EN MÓVIL
============================================= */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--spacing-lg)) 0 var(--spacing-lg);
    }

    .hero__subtitle {
        margin-bottom: var(--spacing-sm);
    }

    .hero__title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-sm);
    }

    .hero__description {
        display: none;
    }

    .hero__buttons {
        flex-direction: row;
    }

    .hero__buttons .btn {
        width: auto;
    }

    .hero__scroll {
        display: none;
    }
}

/* ============================================
   PANTALLAS MUY GRANDES (min-width: 1400px)
============================================= */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    :root {
        --font-size-5xl: 4rem;
    }

    .hero__text {
        max-width: 800px;
    }

    .hero__description {
        max-width: 650px;
    }
}

/* ============================================
   PREFERENCIAS DE MOVIMIENTO REDUCIDO
============================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .nav__menu {
        transition: none;
    }
}

/* ============================================
   IMPRESIÓN
============================================= */
@media print {
    .header,
    .whatsapp-float,
    .hero__scroll,
    .hero__shapes,
    .nav__toggle,
    .nav__close {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
        background: none !important;
        color: #000;
    }

    .hero__title,
    .hero__subtitle,
    .hero__description {
        color: #000 !important;
    }

    section {
        padding: var(--spacing-xl) 0;
        page-break-inside: avoid;
    }

    .service-card,
    .feature-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .footer {
        background: none !important;
        color: #000;
        border-top: 2px solid #000;
    }

    .footer__title,
    .footer__description,
    .footer__list a,
    .footer__contact-list li {
        color: #000 !important;
    }

    .btn {
        border: 2px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
}

/* ============================================
   RESPONSIVE - PÁGINA DE GALERÍA (NUEVA)
============================================= */

@media screen and (max-width: 992px) {
    .gallery-hero__video {
        max-width: 100%;
    }

    .gallery-slider__btn {
        width: 45px;
        height: 45px;
    }
}

@media screen and (max-width: 768px) {
    .gallery-hero {
        padding: var(--spacing-2xl) 0;
    }

    .gallery-categories {
        padding: var(--spacing-3xl) 0;
    }

    .gallery-category {
        margin-bottom: var(--spacing-3xl);
    }

    .gallery-category__title {
        font-size: var(--font-size-xl);
    }

    .gallery-slider {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .gallery-slider__container {
        order: 1;
        width: 100%;
    }

    .gallery-slider__btn {
        display: none;
    }

    .gallery-slider__dots {
        order: 2;
    }

    /* En móvil, permitir swipe */
    .gallery-slider__track {
        cursor: grab;
    }

    .gallery-slider__track:active {
        cursor: grabbing;
    }
}

@media screen and (max-width: 576px) {
    .gallery-hero {
        padding: var(--spacing-xl) 0;
    }

    .gallery-hero__video {
        border-radius: var(--border-radius-md);
    }

    .gallery-slider__placeholder {
        aspect-ratio: 4 / 3;
    }

    .gallery-slider__placeholder svg {
        width: 36px;
        height: 36px;
    }

    .gallery-slider__placeholder span {
        font-size: var(--font-size-xs);
    }

    .gallery-slider__dot {
        width: 10px;
        height: 10px;
    }
}

@media screen and (max-width: 768px) {
    .gallery-nav {
        top: 70px; /* Header más pequeño en móvil */
    }

    .gallery-nav__list {
        gap: var(--spacing-xs);
        padding: var(--spacing-sm) 0;
    }

    .gallery-nav__link {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-xs);
    }
}

@media screen and (max-width: 576px) {
    .gallery-nav {
        top: 60px;
    }

    .gallery-nav__list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gallery-nav__list::-webkit-scrollbar {
        display: none;
    }

    .gallery-nav__link {
        white-space: nowrap;
    }
}

/* ============================================
   RESPONSIVE - PÁGINA DE NOSOTROS
============================================= */

@media screen and (max-width: 992px) {
    .about__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .about__text {
        order: 2;
        text-align: center;
    }

    .about__image {
        order: 1;
        max-width: 500px;
        margin: 0 auto;
    }

    .mission-vision__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media screen and (max-width: 768px) {
    .about {
        padding: var(--spacing-3xl) 0;
    }

    .about__title {
        font-size: var(--font-size-2xl);
    }

    .about__description {
        font-size: var(--font-size-base);
    }

    .mission-vision {
        padding: var(--spacing-3xl) 0;
    }

    .mission-vision__card {
        padding: var(--spacing-xl);
    }

    .mission-vision__icon {
        width: 70px;
        height: 70px;
    }

    .mission-vision__icon svg {
        width: 36px;
        height: 36px;
    }

    .mission-vision__title {
        font-size: var(--font-size-lg);
    }

    .stats {
        padding: var(--spacing-3xl) 0;
    }

    .stats__number {
        font-size: var(--font-size-3xl);
    }

    .stats__label {
        font-size: var(--font-size-xs);
    }
}

@media screen and (max-width: 576px) {
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stats__item {
        padding: var(--spacing-md);
    }

    .stats__number {
        font-size: var(--font-size-2xl);
    }

    .about__image-placeholder {
        aspect-ratio: 16/9;
    }

    .about__image-placeholder svg {
        width: 60px;
        height: 60px;
    }

    .about__image-placeholder span {
        font-size: var(--font-size-lg);
    }
}

/* ============================================
   RESPONSIVE - PÁGINA DE CONTACTO
============================================= */

@media screen and (max-width: 992px) {
    .contact__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .contact__info {
        padding-right: 0;
        text-align: center;
    }

    .contact__detail-item {
        justify-content: center;
        text-align: left;
    }

    .contact__details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact__whatsapp {
        max-width: 350px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .contact {
        padding: var(--spacing-3xl) 0;
    }

    .contact__title {
        font-size: var(--font-size-2xl);
    }

    .contact__description {
        font-size: var(--font-size-base);
    }

    .contact__form-wrapper {
        padding: var(--spacing-xl);
    }

    .contact-form__title {
        font-size: var(--font-size-lg);
    }

    .form-row--two {
        grid-template-columns: 1fr;
    }

    .map__container {
        height: 300px;
    }
}

@media screen and (max-width: 576px) {
    .contact__form-wrapper {
        padding: var(--spacing-lg);
    }

    .contact__detail-icon {
        width: 45px;
        height: 45px;
    }

    .contact__detail-icon svg {
        width: 20px;
        height: 20px;
    }

    .contact__detail-text h4 {
        font-size: var(--font-size-sm);
    }

    .contact__detail-text p {
        font-size: var(--font-size-xs);
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }

    .map__container {
        height: 250px;
    }

    .map__placeholder svg {
        width: 48px;
        height: 48px;
    }

    .map__placeholder span {
        font-size: var(--font-size-lg);
    }
}

/* ============================================
   RESPONSIVE - PÁGINA DE SERVICIOS
============================================= */

@media screen and (max-width: 992px) {
    .service-detail__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    /* En tablet/móvil, imagen siempre arriba */
    .service-detail__image {
        order: 1;
    }

    .service-detail__text {
        order: 2;
        text-align: center;
    }

    .service-detail--reverse .service-detail__image {
        order: 1;
    }

    .service-detail--reverse .service-detail__text {
        order: 2;
    }

    .service-detail__list {
        display: inline-block;
        text-align: left;
    }

    .service-detail__buttons {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .service-detail {
        padding: var(--spacing-3xl) 0;
    }

    .service-detail__title {
        font-size: var(--font-size-xl);
    }

    .service-detail__description {
        font-size: var(--font-size-base);
    }

    .service-detail__image-placeholder {
        aspect-ratio: 16 / 9;
    }
}

@media screen and (max-width: 576px) {
    .service-detail__buttons {
        flex-direction: column;
    }

    .service-detail__buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
