/* responsive.css — All media queries organized by section for base, home, contact, and bujinkan pages */

/* =============================================
   RESPONSIVE
   Targets: iPhone SE (375px), Galaxy S21 (360px),
   iPhone 14 (390px), Pixel 5 (393px),
   iPhone Pro Max (430px), tablets (768px)
   ============================================= */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Header - cambiar overflow para permitir nav wrapped */
    .site-header {
        overflow: visible;
    }

    .site-header .container {
        padding: 10px 0 10px 0;
    }

    .header-content {
        width: 95%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo img {
        width: 280px;
    }

    .main-nav {
        display: none;
    }

    .hamburger-btn {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .btn-whatsapp {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }

    .btn-whatsapp svg {
        width: 24px;
        height: 24px;
    }

    /* Hero */
    .hero-col-left,
    .hero-col-right {
        width: 10%;
    }

    .hero-col-center {
        width: 80%;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-branch-left,
    .hero-branch-right {
        max-width: 140px;
        opacity: 1;
    }

    .hero-samurai {
        width: 100%;
        height: auto;
    }

    .hero-image-area .hero-sun {
        width: 110vw;
    }

    /* Subtitle */
    .subtitle-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
        padding: 0 15px;
    }

    .subtitle-decoration {
        padding: 0;
    }

    .katana {
        width: 97px;
    }

    .subtitle-text {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    /* Decoraciones shodo — reducir en tablet */
    .beneficios-section::before,
    .buj-schools-section::after,
    .contact-page-info::after,
    .clases-schedule-section::after,
    .clases-reviews-section::after {
        width: 280px;
        height: 280px;
    }

    /* Beneficios */
    .beneficios-section {
        padding: 0 4%;
    }

    .beneficios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .beneficio-image {
        min-width: unset;
    }

    .beneficio-content {
        padding: 20px;
    }

    .beneficio-content h3 {
        font-size: 1.3rem;
    }

    /* Red CTA */
    .red-cta-content {
        padding: 40px 6%;
    }

    .red-cta-heading {
        font-size: 1.5rem;
    }

    .red-cta-subtitle {
        font-size: 0.95rem;
    }

    /* Welcome */
    .welcome-grid {
        grid-template-columns: 1fr;
    }

    .welcome-image {
        width: 250px;
        height: 250px;
    }

    /* Contact */
    .contact-row {
        flex-direction: column;
        align-items: center;
    }

    .contact-divider {
        width: 90%;
        height: 1px;
        align-self: auto;
    }

    .contact-heading {
        font-size: 1.5rem;
    }

    .contact-map iframe {
        height: 300px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-logo img {
        width: 120px;
    }

    .footer-detail a {
        font-size: 0.9rem;
    }

    /* Katana decorators */
    .katana {
        width: 97px;
    }

    .welcome-link-wrapper .katana {
        width: 97px;
    }

    /* Shuriken */
    .shuriken-btn {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 15px;
    }

    .shuriken-icon {
        width: 22px;
        height: 22px;
    }

    /* Clases Page - Tablet */
    .clases-hero-section {
        height: auto;
        min-height: 100vh;
    }

    /* Contact Page - Tablet */
    .contact-hero {
        height: auto;
        min-height: 100vh;
    }

    .contact-hero-title {
        font-size: 2.8rem;
    }

    .contact-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-hero-image {
        display: flex;
        max-height: 250px;
        overflow: hidden;
    }

    .contact-hero-image img {
        max-height: 250px;
        width: auto;
        margin: 0 auto;
    }

    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .contact-map-full iframe {
        height: 350px;
    }

    /* Instructores - Tablet */
    .instructores-hero-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .instructores-hero-description {
        font-size: 0.9rem;
        max-width: 100%;
        padding: 0 10px;
    }

    .instructores-photo {
        width: 70vw;
    }

    /* Instructores Bio - Tablet */
    .instructores-bio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .instructor-card {
        padding: 30px 25px;
    }

    .instructor-name {
        font-size: 1.7rem;
    }

    /* Bujinkan - Tablet */
    .buj-hero-section {
        min-height: 100vh;
        padding: 120px 0 60px;
    }

    .buj-hero-title {
        font-size: 2.5rem;
    }

    .buj-schools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .buj-school-card {
        padding: 20px 18px;
    }

    .buj-school-kanji {
        font-size: 1.4rem;
    }

    .buj-school-name {
        font-size: 1.1rem;
    }

    .buj-comparison-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .buj-comparison-vs {
        padding-top: 0;
    }

    .buj-comparison-vs span {
        font-size: 1.5rem;
        padding: 10px 15px;
    }

    .buj-masters-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .buj-master-image img {
        height: 280px;
    }

    .buj-hombu-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .buj-hombu-text .section-title {
        text-align: center;
    }

    .buj-hombu-text .heading-decoration {
        justify-content: center;
    }

    .buj-hombu-image img {
        height: 280px;
    }
}

/* --- Mobile (max-width: 480px) — iPhone, Galaxy, Pixel --- */
@media (max-width: 480px) {

    /* Prevenir scroll horizontal */
    html, body {
        overflow-x: hidden;
    }

    /* Header — compacto, alineado con botones */
    .site-header .container {
        padding: 6px 0;
    }

    .header-content {
        width: 95%;
    }

    .logo img {
        width: 150px;
    }

    .btn-whatsapp {
        width: 36px;
        height: 36px;
        right: 3%;
    }

    .btn-whatsapp svg {
        width: 18px;
        height: 18px;
    }

    /* Hero — Mobile: samurai arriba, texto abajo */
    .hero-section {
        min-height: 100svh;
        overflow: hidden;
    }

    /* Convertir layout a columna en móvil */
    .hero-section .hero-layout {
        flex-direction: column;
        position: relative;
    }

    /* Branches como elementos absolutos sobre el hero */
    .hero-col-left,
    .hero-col-right {
        position: absolute;
        width: auto;
        z-index: 3;
        padding: 0;
    }

    .hero-col-left {
        top: 30%;
        left: -15px;
    }

    .hero-col-right {
        bottom: auto;
        top: 50%;
        right: -15px;
    }

    .hero-col-center {
        width: 100%;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        min-height: calc(100svh - 75px);
    }

    .hero-heading {
        padding: 10px 20px 0;
        text-align: center;
        margin-top: -1.2vh;
        order: 1;
    }

    .hero-section .hero-image-area {
        min-height: 0;
        flex-grow: 0;
        order: 2;
    }

    .hero-content {
        padding: 0 20px 15px;
        order: 3;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .hero-description {
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .hero-branch-left,
    .hero-branch-right {
        width: 120px;
        max-width: none;
        opacity: 0.85;
    }

    .hero-samurai {
        width: auto;
        height: 100%;
        max-height: 100%;
        max-width: 90%;
        object-fit: contain;
    }

    .hero-image-area .hero-sun {
        width: 160vw;
        max-width: none;
    }

    .hero-kanji-watermark {
        height: 60%;
        opacity: 0.2;
        max-width: 100%;
    }

    /* Subtitle */
    .subtitle-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .subtitle-decoration {
        padding: 0;
    }

    .katana {
        width: 90px;
    }

    .subtitle-text {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    /* Decoraciones shodo — ajustar en móvil */
    .beneficios-section::before,
    .buj-schools-section::after,
    .contact-page-info::after,
    .clases-schedule-section::after,
    .clases-reviews-section::after {
        width: 210px;
        height: 210px;
        opacity: 1;
    }

    /* Beneficios */
    .beneficios-section {
        padding: 0 3%;
    }

    .beneficios-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .beneficio-image {
        min-width: unset;
        aspect-ratio: 16 / 10;
    }

    .beneficio-content {
        padding: 20px 15px;
    }

    .beneficio-content h3 {
        font-size: 1.3rem;
    }

    .beneficio-content p {
        font-size: 0.85rem;
    }

    /* Red CTA */
    .red-cta-section {
        min-height: 200px;
    }

    .red-cta-bg {
        background-attachment: scroll;
    }

    .red-cta-content {
        padding: 35px 5%;
    }

    .red-cta-heading {
        font-size: 1.3rem;
    }

    .red-cta-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .red-cta-button {
        font-size: 0.8rem;
        padding: 10px 22px;
        letter-spacing: 1px;
    }

    /* Katana decorations — 3-column layout: katana | texto | katana */
    .heading-decoration,
    .subtitle-decoration {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .heading-decoration .katana,
    .subtitle-decoration .katana {
        width: 90px;
        flex-shrink: 0;
    }

    .heading-decoration p,
    .heading-decoration h4,
    .heading-decoration span,
    .subtitle-decoration .subtitle-text {
        flex-shrink: 1;
        min-width: 0;
        white-space: normal;
        text-align: center;
        font-size: 1rem;
        line-height: 1.4;
    }

    /* Rajdhani: compensación visual del ascender alto */
    .heading-decoration h4,
    .heading-decoration .subtitle-text {
        transform: translateY(0.08em);
    }
    .subtitle-decoration .subtitle-text {
        transform: translateY(0.05em);
    }

    /* Welcome */
    .welcome-col {
        padding: 25px 15px 40px;
    }

    .welcome-image {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .welcome-title {
        font-size: 1rem;
        padding: 0 10px;
        margin-bottom: 15px;
    }

    .welcome-link-wrapper {
        gap: 0;
        margin-bottom: 15px;
    }

    .welcome-link-wrapper .katana {
        width: 90px;
    }

    .welcome-link {
        font-size: 1.15rem;
        letter-spacing: 1px;
    }

    .welcome-text {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    /* Contact */
    .contact-info-section {
        padding: 40px 0 0;
        background-attachment: scroll;
    }

    .contact-block {
        padding: 20px 15px;
    }

    .contact-heading {
        font-size: 1.55rem;
    }

    .contact-text {
        font-size: 1rem;
    }

    .contact-icon-circle {
        width: 56px;
        height: 56px;
    }

    .contact-icon-circle svg {
        width: 22px;
        height: 22px;
    }

    .contact-icons {
        gap: 20px;
    }

    .contact-map iframe {
        height: 250px;
    }

    /* Footer */
    .site-footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 25px;
        padding: 0 15px;
    }

    .footer-logo img {
        width: 90px;
    }

    .footer-info h4 {
        font-size: 1.5rem;
    }

    .footer-detail {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .footer-detail a {
        font-size: 0.85rem;
    }

    /* Shuriken */
    .shuriken-btn {
        width: 40px;
        height: 40px;
        bottom: 12px;
        right: 12px;
    }

    .shuriken-icon {
        width: 20px;
        height: 20px;
    }

    /* Contact Page - Mobile */
    .contact-hero .hero-col-left,
    .contact-hero .hero-col-right {
        display: none;
    }

    .contact-hero {
        height: auto;
        min-height: 100vh;
    }

    .contact-hero-content {
        padding: 15px 15px 10px;
    }

    .contact-hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }

    .contact-hero-content .subtitle-decoration {
        margin-bottom: 20px;
    }

    .contact-hero-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Show image on mobile as a compact element above form */
    .contact-hero-image {
        display: flex;
        max-height: 180px;
        overflow: hidden;
    }

    .contact-hero-image img {
        max-height: 180px;
        width: auto;
        margin: 0 auto;
    }

    /* Compact form on mobile */
    .contact-form .form-group {
        margin-bottom: 12px;
    }

    .contact-form .form-input {
        padding: 8px 0;
        font-size: 0.85rem;
    }

    .contact-form .form-textarea {
        min-height: 70px;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-submit-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin-top: 5px;
    }

    .contact-page-info {
        padding: 40px 0;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-card {
        padding: 20px 15px;
    }

    .contact-card-icon {
        width: 56px;
        height: 56px;
    }

    .contact-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .contact-map-full iframe {
        height: 280px;
    }

    /* Instructores - Mobile */
    .instructores-hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .instructores-hero-tagline {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .instructores-hero-description {
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 0 5px;
    }

    .instructores-hero-section {
        height: auto;
        min-height: 100vh;
        padding-bottom: 0;
    }

    .instructores-hero-content {
        padding-top: 10px;
        padding-bottom: 0;
    }

    .instructores-hero-section .instructores-hero-title {
        margin-bottom: 8px;
    }

    .instructores-hero-section .heading-decoration .katana {
        display: none;
    }

    .instructores-hero-section .hero-col-left,
    .instructores-hero-section .hero-col-right {
        padding-top: 5%;
    }

    .instructores-hero-section .hero-col-left .hero-branch-left {
        position: relative;
        top: -77px;
    }

    .instructores-hero-section .hero-image-area {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
        position: relative;
        top: -64px;
    }

    .instructores-hero-section .instructores-photo {
        width: 115%;
        max-width: none;
        height: auto;
        margin-left: -7.5%;
        object-fit: contain;
    }

    .instructores-hero-section .hero-image-area {
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .instructores-hero-section .hero-image-area .hero-sun {
        width: 160vw;
        bottom: 0;
        top: auto;
    }

    .instructores-hero-section .hero-col-right .hero-branch-right {
        position: relative;
        top: 80px;
    }

    /* Show mobile description inside hero, hide desktop-large and separate section */
    .instructores-hero-description--desktop-large {
        display: none !important;
    }

    .instructores-hero-description--mobile {
        display: block !important;
        padding: 0 20px 30px;
        margin-top: -10px;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .instructores-description-section {
        display: none;
    }

    /* Instructores Bio - Mobile */
    .instructores-bio-section {
        padding: 50px 0;
    }

    .instructores-bio-grid {
        gap: 25px;
    }

    .instructor-card {
        padding: 25px 20px;
    }

    .instructor-name {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .instructor-bio p {
        font-size: 0.88rem;
    }

    .discipline-tag {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    /* Clases - Mobile */
    .clases-hero-section {
        height: auto;
        min-height: 100vh;
        padding-bottom: 0;
    }

    .clases-hero-title {
        font-size: 2rem;
    }

    .clases-hero-description--desktop-large {
        display: none !important;
    }

    .clases-hero-description--mobile {
        display: block !important;
        padding: 0 20px 30px;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .clases-description-section {
        display: none;
    }

    /* Contact - Mobile */
    .contact-hero {
        height: auto;
        min-height: 100vh;
    }

    /* Bujinkan - Mobile */
    .buj-hero-section {
        height: auto;
        min-height: 100vh;
        padding-bottom: 0;
    }

    .buj-hero-content {
        padding-bottom: 0;
    }

    .buj-hero-content .heading-decoration {
        margin-bottom: 15px;
    }

    .buj-hero-section .hero-image-area {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }

    .buj-hero-section .soke-photo {
        width: 100%;
        max-width: none;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;
    }

    .buj-hero-section .hero-image-area .hero-sun {
        width: 320vw;
        bottom: 0;
        top: auto;
    }

    .buj-hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .buj-hero-description p {
        font-size: 0.95rem;
    }


    .buj-schools-grid {
        grid-template-columns: 1fr;
    }

    .buj-school-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .buj-comparison-col {
        padding: 25px 20px;
    }

    .buj-master-image img {
        height: 220px;
    }

    .buj-hombu-image img {
        height: 220px;
    }
}

/* --- Small phones (max-width: 360px) — iPhone SE, Galaxy S small --- */
@media (max-width: 360px) {

    .logo img {
        width: 170px;
    }

    .main-nav {
        gap: 8px;
    }

    .nav-link {
        font-size: 0.6rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.65rem;
    }

    .hero-description {
        font-size: 0.75rem;
    }

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

    .welcome-image {
        width: 170px;
        height: 170px;
    }

    .contact-icon-circle {
        width: 48px;
        height: 48px;
    }

    .contact-icon-circle svg {
        width: 18px;
        height: 18px;
    }
}

/* --- Pantallas ~1512px — reducir fuentes ligeramente --- */
@media (min-width: 1200px) and (max-width: 1600px) {
    .nav-link {
        font-size: 0.8rem;
        letter-spacing: 1.5px;
        gap: 4px;
    }

    .nav-shuriken {
        width: 12px;
        height: 12px;
    }

    .main-nav {
        gap: 30px;
    }

    /* Títulos hero — igualar al tamaño de Home */
    .hero-title,
    .instructores-hero-title,
    .clases-hero-title,
    .contact-hero-title,
    .buj-hero-title {
        font-size: 3rem;
    }

    /* Subtítulos */
    .hero-subtitle,
    .instructores-hero-tagline,
    .clases-hero-tagline,
    .buj-hero-tagline {
        font-size: 1rem;
    }

    .subtitle-text {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.88rem;
    }

    .instructores-hero-description,
    .clases-hero-description {
        font-size: 0.88rem;
    }
}

/* --- Pantallas grandes ~2560px — fuentes más grandes --- */
@media (min-width: 2200px) {
    .nav-link {
        font-size: 1.15rem;
        letter-spacing: 3px;
    }

    .nav-shuriken {
        width: 18px;
        height: 18px;
    }

    .main-nav {
        gap: 55px;
    }

    .logo img {
        width: 550px;
    }

    .btn-whatsapp {
        width: 65px;
        height: 65px;
    }

    .btn-whatsapp svg {
        width: 32px;
        height: 32px;
    }

    .subtitle-text {
        font-size: 1.5rem;
    }

    .katana {
        width: 180px;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }

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

    .instructores-hero-title,
    .clases-hero-title {
        font-size: 5.5rem;
    }

    .instructores-hero-tagline,
    .clases-hero-tagline,
    .buj-hero-tagline {
        font-size: 1.5rem;
    }

    .instructores-hero-description,
    .clases-hero-description {
        font-size: 1.15rem;
        max-width: 900px;
    }

    .contact-hero-title {
        font-size: 5.5rem;
    }

    .buj-hero-title {
        font-size: 4.5rem;
    }

    /* General body text */
    .beneficio-content p,
    .welcome-text,
    .instructor-bio p {
        font-size: 1.1rem;
    }

    .beneficio-content h3 {
        font-size: 1.8rem;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .welcome-link {
        font-size: 1.6rem;
    }

    /* Footer */
    .footer-detail a {
        font-size: 1.05rem;
    }

    .footer-info h4 {
        font-size: 2.2rem;
    }
}

/* --- Pantallas con poca altura (ej. MacBook 14") --- */
@media (max-height: 900px) and (min-width: 769px) {
    .logo img {
        width: 350px;
    }

    .hero-title,
    .instructores-hero-title,
    .clases-hero-title,
    .contact-hero-title,
    .buj-hero-title {
        font-size: 3rem;
        margin-bottom: 10px;
    }

    .hero-subtitle,
    .instructores-hero-tagline,
    .clases-hero-tagline,
    .buj-hero-tagline {
        margin-bottom: 10px;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-heading {
        padding: 30px 0 10px;
    }

    .hero-content {
        padding: 0 0 10px;
    }

    .hero-branch-left,
    .hero-branch-right {
        max-width: none;
        width: 280px;
    }

    .hero-image-area .hero-sun {
        width: 62vw;
    }

    .hero-section .hero-image-area {
        min-height: 22vh;
    }

    .hero-samurai {
        max-height: calc(100vh - 450px);
    }
}
