/*==========================================================
  Sikker Plastics - Ajustes responsivos (tablet y móvil)
  Se carga después de style.css y solo sobrescribe lo necesario.
==========================================================*/

/* Tap sin parpadeo gris en iOS/Android */
a, .btn, .menu-toggle {
    -webkit-tap-highlight-color: transparent;
}

/* Scroll suave al navegar por el menú, sin que la barra fija tape el título */
html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 50px;
}

@media only screen and (max-width: 991px) {
    section[id] {
        scroll-margin-top: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Mapa siempre al ancho disponible */
#contact iframe {
    display: block;
    max-width: 100%;
}


/*----------------------------------------------------------
  TABLET Y MÓVIL (≤ 991px)
----------------------------------------------------------*/
@media only screen and (max-width: 991px) {

    /* ---- Barra superior fija con logo ---- */
    section.header .header-logo-wrap,
    section.header.header-parallax.fixed-top .header-logo-wrap {
        position: fixed;
        top: 0;
        left: 0;
        height: 56px;
        background-color: var(--primary-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 500 !important;
    }

    section.header .header-logo-wrap .container,
    section.header-parallax.fixed-top .header-logo-wrap .container {
        height: 56px;
        padding: 0 15px;
    }

    section.header .container .logo,
    section.header-parallax.fixed-top .container .logo {
        position: absolute;
        top: 5px;
        left: 15px;
        margin: 0;
        padding: 0;
        min-width: 0;
        min-height: 0;
        width: auto;
        z-index: 20;
    }

    section.header .container .logo img {
        width: 46px;
        height: 46px;
    }

    section.header .container .menu-mobile {
        position: static;
        width: auto;
        float: right;
        padding: 0;
    }

    section.header .container .menu-mobile i.menu-toggle {
        width: 56px;
        height: 56px;
        line-height: 56px;
        font-size: 26px;
        margin-right: -15px;
    }

    section.header .container .menu-mobile.open ul.menu {
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
    }

    .menu-mobile.cssmenu ul li a {
        padding: 16px 24px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* ---- Secciones: menos aire vertical ---- */
    section .container {
        padding: 80px 20px;
    }

    section.contact .container {
        padding: 80px 20px 60px 20px;
    }

    /* Títulos dentro de .row: compensar el margen negativo de Bootstrap */
    section .row > .heading,
    section .row > .subheading {
        padding-left: 15px;
        padding-right: 15px;
    }

    section .headul {
        margin: 28px auto 28px auto;
    }

    section .subheading {
        padding: 0 10px 48px 10px;
        font-size: 16px;
        line-height: 28px;
    }

    /* ---- Nosotros: botas debajo del texto, sin superponerse ---- */
    section.services .container,
    body.horizontal section.services,
    section.services {
        padding-bottom: 0;
    }

    section.services .container {
        padding-bottom: 60px;
    }

    section.services img[alt="Sikker Plastics"] {
        max-width: 320px;
        margin: 0 auto 10px auto;
    }

    section.services .subheading.left-align {
        text-align: center;
        padding-bottom: 20px;
    }

    /* Las dos botas se enciman, como en escritorio, pero en flujo normal */
    .service-tablets {
        position: static;
        top: auto;
        margin: 32px auto 0 auto;
        min-height: 0;
        max-width: 560px;
        float: none;
        clear: both;
    }

    .service-tablets .tablet-black,
    .service-tablets .tablet-white {
        position: relative;
        top: auto;
        width: 88%;
    }

    .service-tablets .tablet-white {
        margin: -22% 0 0 12%;
    }

    /* ---- Hero: bloque negro arriba, amarillo abajo ---- */
    section.header .header-slide {
        height: calc(100vh - 56px);
        height: calc(100svh - 56px);
        min-height: 480px;
        max-height: 820px;
        margin-top: 56px;
        overflow: hidden;
    }

    section.header .header-img {
        width: 100%;
        height: 100%;
        margin-left: 0;
        object-fit: cover;
        object-position: 30% center;
    }

    section.header .overlay .black {
        width: 100%;
        height: 58%;
        left: 0;
    }

    section.header .overlay .primary {
        width: 100%;
        height: 42%;
        left: 0;
        top: 58%;
    }

    section.header .maintext,
    section.header.header-parallax .maintext {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    section.header .maintext .primary-text,
    section.header .maintext .black-text {
        float: none;
        width: 100%;
    }

    section.header .maintext .primary-text {
        flex: 0 0 58%;
        display: flex;
        align-items: flex-end;
        padding: 0 40px 32px 40px;
    }

    section.header .maintext .primary-text div {
        float: none;
        padding: 0 0 0 16px;
        border-left-width: 6px;
    }

    section.header .maintext .primary-text h4 {
        font-size: 20px;
        line-height: 1.3;
        letter-spacing: 1px;
        margin: 0 0 10px 0;
        white-space: normal;
    }

    section.header .maintext .primary-text h1,
    section.header .maintext .black-text h1 {
        font-size: 60px;
        line-height: 1.05;
        white-space: normal;
        margin: 0;
    }

    section.header .maintext .black-text {
        flex: 0 0 42%;
        padding: 32px 40px 0 62px;
    }

    section.header .maintext .black-text div {
        padding-left: 0;
    }

    section.header .maintext .black-text br {
        display: none;
    }

    section.header .maintext .black-text h3 {
        font-size: 24px;
        line-height: 1.4;
        margin: 14px 0 0 0;
        color: #212121;
        max-width: 420px;
    }

    /* ---- Footer ---- */
    section.footer .copyright {
        margin-top: 0;
    }
}


/*----------------------------------------------------------
  MÓVIL (≤ 767px)
----------------------------------------------------------*/
@media only screen and (max-width: 767px) {

    section .container {
        padding: 64px 20px;
    }

    section .heading.h1,
    section .heading {
        font-size: 32px;
        line-height: 1.2;
    }

    section .subheading {
        font-size: 15px;
        line-height: 26px;
        padding: 0 0 40px 0;
    }

    section.contact .container {
        padding: 64px 20px 40px 20px;
    }

    /* ---- Hero (tamaños de teléfono) ---- */
    section.header .header-slide {
        max-height: 760px;
    }

    section.header .maintext .primary-text {
        padding: 0 24px 26px 24px;
    }

    section.header .maintext .primary-text h4 {
        font-size: 15px;
    }

    section.header .maintext .primary-text h1,
    section.header .maintext .black-text h1 {
        font-size: 38px;
    }

    section.header .maintext .black-text {
        padding: 24px 24px 0 46px;
    }

    section.header .maintext .black-text h3 {
        font-size: 18px;
        margin-top: 12px;
        max-width: 260px;
    }

    /* ---- Productos: filtros en chips + galería a 2 columnas ---- */
    .filter-categories {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 0;
        margin-bottom: 28px;
    }

    .filter-categories .btn.filter {
        margin: 0;
        padding: 8px 14px;
        font-size: 12px;
        line-height: 1.2;
        border: 1px solid #e0e0e0;
        border-radius: 999px;
    }

    .filter-categories .btn.filter.active {
        border-color: var(--primary-color);
    }

    .filter-items {
        padding: 0 5px;
    }

    .filter-mixitup .filter-item {
        padding: 5px;
        background: transparent;
    }

    /* ---- Nosotros ---- */
    section.services .container {
        padding-bottom: 48px;
    }

    section.services p {
        font-size: 15px;
        line-height: 26px;
    }

    .service-tablets {
        margin-top: 24px;
    }

    /* ---- Nuestros servicios: icono arriba, texto centrado ---- */
    .features .feature,
    .feature {
        margin-bottom: 48px;
        text-align: center;
    }

    .features .feature:last-child {
        margin-bottom: 0;
    }

    .feature .icon {
        width: 56px;
        margin: 0 auto 16px auto;
    }

    .feature .info {
        padding-left: 0;
    }

    .feature .info .title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .feature .info p {
        font-size: 15px;
        line-height: 26px;
    }

    section.whychooseus .heading + p {
        display: none;
    }

    section.whychooseus .heading {
        margin-bottom: 40px;
    }

    /* ---- Certificaciones: 3 logos en una fila ---- */
    section.capabilities .product {
        padding: 0 8px;
        margin-bottom: 0;
    }

    section.capabilities .product .pic img {
        max-height: 90px;
        width: auto;
        margin: 0 auto;
    }

    section.capabilities .politica-calidad {
        margin-top: 40px;
        padding: 0;
    }

    section.capabilities .politica-calidad h3 {
        font-size: 20px;
        margin-bottom: 18px;
    }

    /* ---- Contacto ---- */
    #contact .contact-person {
        margin: 0 0 32px 0;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    #contact .contact-person .pic,
    #contact .contact-person .info {
        float: none;
        width: auto;
        padding: 0;
    }

    #contact .contact-person .pic {
        flex: 0 0 84px;
    }

    #contact .contact-person .pic img {
        float: none;
        width: 84px;
        height: 84px;
    }

    #contact .contact-person .info {
        flex: 1 1 auto;
        min-width: 0;
    }

    #contact .contact-person .info div {
        white-space: normal;
        word-break: break-word;
    }

    #contact .contact-person .info a {
        color: inherit;
    }

    #contact iframe {
        width: 100%;
        height: 320px;
        border-radius: 4px;
    }

    /* ---- Footer ---- */
    section.footer .copyright .message {
        padding-top: 16px;
        font-size: 13px;
    }
}


/*----------------------------------------------------------
  PANTALLAS TÁCTILES (sin hover) Y MÓVIL
  Toda la tarjeta de producto abre la imagen y muestra el nombre.
----------------------------------------------------------*/
@media (hover: none), only screen and (max-width: 767px) {

    .filter-mixitup .filter-item {
        padding: 5px;
        background: transparent;
    }

    .filter-mixitup .filter-item .info {
        opacity: 1;
        background: transparent;
        top: 5px;
        left: 5px;
        width: calc(100% - 10px);
        height: calc(100% - 10px);
    }

    .filter-mixitup .filter-item:hover img {
        -webkit-transform: none;
        transform: none;
    }

    .filter-mixitup .filter-item .info .btn {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        border-radius: 0;
        white-space: normal;
        text-align: left;
        background: linear-gradient(to top, rgba(33, 33, 33, 0.8) 0%, rgba(33, 33, 33, 0) 50%);
        box-shadow: none;
    }

    .filter-mixitup .filter-item .info .btn::before {
        content: attr(title);
        position: absolute;
        left: 10px;
        right: 44px;
        bottom: 10px;
        color: #ffffff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.25;
        text-transform: uppercase;
    }

    .filter-mixitup .filter-item .info .btn i {
        position: absolute;
        top: auto;
        right: 8px;
        bottom: 8px;
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 15px;
        text-align: center;
        border-radius: 50%;
        color: #212121;
        background-color: var(--primary-color);
    }

}


/*----------------------------------------------------------
  MÓVIL PEQUEÑO (≤ 360px)
----------------------------------------------------------*/
@media only screen and (max-width: 360px) {

    section .heading.h1,
    section .heading {
        font-size: 28px;
    }

    section.header .maintext .primary-text h1,
    section.header .maintext .black-text h1 {
        font-size: 33px;
    }

    .filter-categories .btn.filter {
        padding: 7px 11px;
        font-size: 11px;
    }
}
