/* ========================================
   RESPONSIVE.CSS - Syrtec
   Mobile-First Approach
   ======================================== */

/* ========================================
   BREAKPOINTS
   ======================================== */
/* 
   mobile: 320px - 480px
   tablet: 481px - 768px
   desktop: 769px - 1024px
   wide: 1025px - 1200px
   ultra-wide: 1201px+
*/

/* ========================================
   MOBILE FIRST - BASE (320px - 480px)
   ======================================== */

/* Contenedor */
.container {
    padding: 0 16px;
}

/* Tipografía */
html {
    font-size: 15px;
}

/* Secciones */
.section-title {
    font-size: 1.75rem;
}

.section-description {
    font-size: 1rem;
    padding: 0 8px;
}

.section-header {
    margin-bottom: 2rem;
}

.section-tag {
    font-size: 0.7rem;
    padding-left: 1rem;
}

.section-tag::before {
    width: 12px;
}

/* Botones */
.btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    min-height: 48px;
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    min-height: 54px;
}

/* ========================================
   HEADER (Mobile)
   ======================================== */
.header__inner {
    height: 64px;
}

.header__logo img {
    height: 36px;
}

.header__hamburger {
    display: flex;
    gap: 5px;
}

.header__hamburger span {
    width: 24px;
    height: 2px;
}

.header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    padding: 80px 24px 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    z-index: 99;
    display: block !important;
}

.header__nav.open {
    right: 0;
}

/* Overlay para el menú móvil - UNIFICADO con menu-overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 61, 0.6);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.header__menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
}

.header__menu li {
    border-bottom: 1px solid var(--color-gray-100);
}

.header__menu li a {
    display: block;
    padding: 14px 8px;
    font-size: 1rem;
    font-weight: 500;
}

.header__menu li a::after {
    display: none;
}

.header__menu li a.active {
    color: var(--color-accent);
}

.header__btn-shop {
    margin-top: 12px;
    text-align: center;
    background: var(--gradient-accent) !important;
    color: var(--color-white) !important;
    border-radius: var(--radius-full);
    padding: 12px !important;
    font-weight: 600 !important;
}

/* ========================================
   HERO (Mobile)
   ======================================== */
.hero {
    min-height: 100vh;
    padding: 80px 0 40px;
    align-items: center;
}

.hero__content {
    padding: 20px 0;
    text-align: center;
}

.hero__title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero__title br {
    display: inline;
}

.hero__subtitle {
    font-size: 0.95rem;
    margin: 0 auto 1.25rem;
    max-width: 100%;
    padding: 0 4px;
}

.hero__buttons {
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.hero__buttons .btn {
    width: 100%;
    max-width: 280px;
}

/* ========================================
   ABOUT (Mobile)
   ======================================== */
.about {
    padding: 3rem 0;
}

.about__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.about__text {
    font-size: 0.95rem;
}

.about__stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
}

.stat__number {
    font-size: 1.75rem;
}

.stat__label {
    font-size: 0.8rem;
}

.about__image img {
    height: 240px;
}

/* ========================================
   SERVICES (Mobile)
   ======================================== */
.services {
    padding: 3rem 0;
}

.services__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.service-card__image {
    height: 180px;
}

.service-card__content {
    padding: 1.25rem;
}

.service-card__content h3 {
    font-size: 1.1rem;
}

/* ========================================
   SECTORS (Mobile)
   ======================================== */
.sectors {
    padding: 3rem 0;
}

.sectors__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sector-card {
    aspect-ratio: 4 / 3;
}

.sector-card__content {
    padding: 1rem;
}

.sector-card__content h3 {
    font-size: 0.95rem;
}

.sector-card__content p {
    font-size: 0.7rem;
}

/* ========================================
   WHY SYRTEC (Mobile)
   ======================================== */
.why-syrtec {
    padding: 3rem 0;
}

.why-syrtec__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.why-card {
    padding: 1.25rem;
}

.why-card__icon {
    width: 60px;
    height: 60px;
    margin-bottom: 0.75rem;
}

.why-card__icon img {
    width: 28px;
    height: 28px;
}

.why-card h3 {
    font-size: 1rem;
}

/* ========================================
   PROJECTS (Mobile)
   ======================================== */
.projects {
    padding: 3rem 0;
}

.projects__gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-item {
    aspect-ratio: 4 / 3;
}

.project-item__overlay {
    padding: 1.25rem;
}

.project-item__overlay h3 {
    font-size: 1.1rem;
}

.project-item__overlay p {
    font-size: 0.85rem;
}

/* ========================================
   BRANDS (Mobile)
   ======================================== */
.brands {
    padding: 2.5rem 0;
}

.brands__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.brand-item {
    max-width: 100%;
    padding: 0.5rem;
}

.brand-item img {
    max-height: 40px;
}

/* ========================================
   SHOP CTA (Mobile)
   ======================================== */
.shop-cta {
    padding: 3rem 0;
}

.shop-cta__content h2 {
    font-size: 1.75rem;
}

.shop-cta__content p {
    font-size: 0.95rem;
    padding: 0 8px;
}

/* ========================================
   CONTACT (Mobile)
   ======================================== */
.contact {
    padding: 3rem 0;
}

.contact__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact__form {
    padding: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    font-size: 0.95rem;
}

.contact__card {
    padding: 1.25rem;
}

.contact__card h3 {
    font-size: 1.1rem;
}

.contact__map iframe {
    height: 200px;
}

/* ========================================
   FOOTER (Mobile)
   ======================================== */
.footer {
    padding: 2.5rem 0 1.25rem;
}

.footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.footer__brand p {
    max-width: 100%;
}

.footer__social {
    gap: 0.75rem;
}

.footer__social a {
    width: 36px;
    height: 36px;
}

.footer__social svg {
    width: 16px;
    height: 16px;
}

.footer h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.footer ul li {
    margin-bottom: 0.4rem;
}

.footer ul li a {
    font-size: 0.85rem;
}

.footer__bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
}

.footer__bottom p {
    flex-direction: column;
    gap: 0.5rem;
}

/* ========================================
   TABLET (481px - 768px)
   ======================================== */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    html {
        font-size: 16px;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        width: auto;
        min-width: 180px;
        padding: 12px 32px;
    }

    .hero__buttons .btn {
        width: auto;
        min-width: 200px;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .hero__buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .about__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .about__image img {
        height: 300px;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .sectors__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .why-syrtec__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects__gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .brands__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .brand-item img {
        max-height: 50px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .footer__bottom p {
        flex-direction: row;
        gap: 1rem;
    }

    .contact__inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========================================
   DESKTOP (769px - 1024px)
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 32px;
        max-width: 960px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .btn {
        width: auto;
        padding: 14px 36px;
    }

    .header__inner {
        height: 72px;
    }

    .header__menu {
        gap: 0.75rem;
    }

    .header__menu li a {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .hero__title {
        font-size: 3rem;
    }

    .hero__buttons {
        flex-direction: row;
    }

    .about__inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .about__image img {
        height: 320px;
    }

    .services__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .service-card__image {
        height: 160px;
    }

    .sectors__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .why-syrtec__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects__gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .brands__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 1.5rem;
    }

    .contact__inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .shop-cta__content h2 {
        font-size: 2.5rem;
    }
}

/* ========================================
   WIDE SCREEN (1025px - 1200px)
   ======================================== */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1100px;
        padding: 0 40px;
    }

    .hero__title {
        font-size: 3.75rem;
    }

    .services__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .sectors__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .projects__gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .brands__grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========================================
   ULTRA WIDE (1201px+)
   ======================================== */
@media (min-width: 1201px) {
    .container {
        max-width: 1200px;
        padding: 0 48px;
    }

    .hero__title {
        font-size: 4.5rem;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }

    .services__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .sectors__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .projects__gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .brands__grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2rem;
    }
}

/* ========================================
   ORIENTATION - LANDSCAPE (Mobile)
   ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 70px 0 20px;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .hero__subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .hero__buttons .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .about__image img {
        height: 180px;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sectors__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .footer,
    .hero__buttons,
    .services__cta,
    .projects__cta,
    .shop-cta,
    .contact__form {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
        background: var(--color-white) !important;
    }

    .hero__overlay {
        display: none !important;
    }

    .hero__title {
        color: var(--color-primary) !important;
    }

    .hero__subtitle {
        color: var(--color-gray-600) !important;
    }

    .about,
    .services,
    .sectors,
    .why-syrtec,
    .projects,
    .brands,
    .contact {
        padding: 20px 0 !important;
        background: var(--color-white) !important;
    }

    .section-title {
        color: var(--color-primary) !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 20px !important;
    }
}

/* ========================================
   ACCESIBILIDAD - REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   UTILITY - SCROLLBAR HIDE (Opcional)
   ======================================== */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ========================================
   MENÚ MÓVIL - RESPONSIVE FINAL
   ======================================== */

/* Hamburguesa - siempre visible en móvil */
@media (max-width: 768px) {
    .header__hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px 8px;
        z-index: 101;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }

    .header__hamburger span {
        display: block;
        width: 28px;
        height: 2.5px;
        background: var(--color-primary, #0A1E3D);
        border-radius: 4px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .header__hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .header__hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .header__hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .header__nav {
        width: 80%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .header__inner {
        height: 56px;
        padding: 0 8px;
    }

    .header__logo-wrapper {
        gap: 6px;
    }

    .header__logo img {
        height: 28px !important;
        width: auto;
    }

    .header__logo-text .brand-name {
        font-size: 0.65rem !important;
        line-height: 1.1;
    }

    .header__logo-text .brand-sub {
        font-size: 0.4rem !important;
        line-height: 1.1;
        letter-spacing: 0.2px;
    }

    .header__hamburger {
        padding: 8px 6px;
        min-width: 40px;
        min-height: 40px;
    }

    .header__hamburger span {
        width: 22px;
        height: 2px;
    }

    .header__hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .header__hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    .header__nav {
        width: 85%;
        max-width: 280px;
        padding: 60px 16px 16px;
    }

    .header__menu li a {
        padding: 10px 6px;
        font-size: 0.85rem;
    }

    .header__btn-shop {
        padding: 10px !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 360px) {
    .header__logo img {
        height: 24px !important;
    }

    .header__logo-text .brand-name {
        font-size: 0.55rem !important;
    }

    .header__logo-text .brand-sub {
        font-size: 0.35rem !important;
    }

    .header__hamburger span {
        width: 18px;
        height: 2px;
    }

    .header__nav {
        max-width: 240px;
        padding: 50px 12px 12px;
    }

    .header__menu li a {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
}