/**
 * SkySales Pro - Estilos base (compartidos por todas las vistas)
 * Variables, reset, header, footer, navegación, formularios de contacto
 */

:root {
    --color-primary: #1D2343;
    --color-secondary: #223A8A;
    --primary: #ffffff;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-lighter: #ffffff;
    --text: #4A5568;
    --text-muted: #9ca3af;
    --nav-bg: #ffffff;
    --nav-link: var(--color-primary);
    --nav-underline: var(--color-primary);
    --nav-cta-bg: var(--color-primary);
    --nav-height: 108px;
    --nav-logo-height: clamp(62px, 7.5vw, 82px);
    --nav-height-mobile: 88px;
    --nav-logo-height-mobile: clamp(52px, 13vw, 66px);
}

/* Page loader */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    background: #ffffff;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader__logo {
    width: clamp(140px, 28vw, 200px);
    height: auto;
    display: block;
}

.page-loader__spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(34, 58, 138, 0.18);
    border-top-color: var(--color-secondary, #223A8A);
    animation: page-loader-spin 0.75s linear infinite;
}

html.is-ready .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

html.is-ready body > *:not(.page-loader) {
    visibility: visible;
}

@keyframes page-loader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader__spinner {
        animation: none;
        border-top-color: var(--color-secondary, #223A8A);
        opacity: 0.7;
    }

    .page-loader {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top right, var(--bg-lighter), var(--bg-dark));
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    font-synthesis: none;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

/* Tipografías */
@font-face {
    font-family: 'Montserrat';
    src: url('../res/fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../res/fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../res/fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../res/fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../res/fonts/Montserrat-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Poppins';
    src: url('../res/fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Poppins';
    src: url('../res/fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Poppins';
    src: url('../res/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Poppins';
    src: url('../res/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: block;
}

body > header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100vw;
    padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem);
    background: var(--nav-bg);
    box-shadow: 0 4px 18px rgba(29, 35, 67, 0.1);
    border-bottom: none;
    box-sizing: border-box;
    transition: background 0.3s ease;
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
}

body > header nav.navbar {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: clamp(1.5rem, 3vw, 3rem);
    margin: 0;
    position: relative;
}

.nav-menu {
    position: relative;
    justify-self: center;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(2rem, 4vw, 4.5rem);
}

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

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    transition:
        left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.nav-indicator.is-visible {
    opacity: 1;
}

.nav-links li {
    display: flex;
    align-items: stretch;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 0;
}

.nav-logo img {
    height: var(--nav-logo-height);
    width: auto;
    object-fit: contain;
}

.nav-links a {
    color: var(--nav-link);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0 0.5rem;
    border-radius: 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover:not(.active) {
    color: var(--color-secondary);
}

.nav-links a:focus,
.nav-links a:focus-visible {
    outline: none;
}

.nav-links a.active,
.nav-links a.active:hover,
.nav-links a.active:focus,
.nav-links a.active:focus-visible {
    color: var(--color-secondary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0.85rem 1.75rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 1.25vw, 1.12rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: none;
    transition: background 0.2s ease;
}

.nav-cta span {
    color: #ffffff;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    background: var(--color-secondary);
    color: #ffffff;
}

.nav-cta:active {
    background: var(--color-primary);
    opacity: 0.92;
}

.nav-cta__icon {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    object-fit: contain;
}

.nav-cta--mobile {
    margin-top: 1.25rem;
    align-self: flex-start;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.35rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
    color: var(--color-secondary);
}

.mobile-menu-btn:focus-visible {
    outline: none;
}

.nav-mobile-panel {
    display: none;
}

@media (max-width: 900px) {

    html {
        scroll-padding-top: var(--nav-height-mobile);
    }

    body > header {
        min-height: var(--nav-height-mobile);
        padding: 1rem 1.25rem;
    }

    .nav-logo img {
        height: var(--nav-logo-height-mobile);
    }

    body > header nav.navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-menu {
        display: none;
    }

    .nav-logo {
        position: static;
        transform: none;
    }

    .nav-cta:not(.nav-cta--mobile) {
        display: none;
    }

    .nav-mobile-panel {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        gap: 0.25rem;
        z-index: 999;
    }

    .nav-mobile-panel .nav-item {
        color: var(--color-primary);
        font-family: 'Montserrat', sans-serif;
        font-weight: 700;
        font-size: 1.05rem;
        text-transform: none;
        letter-spacing: 0.01em;
        justify-content: flex-start;
        padding: 0.65rem 0;
        border-radius: 6px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        position: relative;
        transition: color 0.2s ease;
    }

    .nav-mobile-panel .nav-item:hover:not(.active) {
        color: var(--color-secondary);
    }

    .nav-mobile-panel .nav-item:focus,
    .nav-mobile-panel .nav-item:focus-visible {
        outline: none;
    }

    .nav-mobile-panel .nav-item.active,
    .nav-mobile-panel .nav-item.active:hover,
    .nav-mobile-panel .nav-item.active:focus,
    .nav-mobile-panel .nav-item.active:focus-visible {
        color: var(--color-secondary);
        background: transparent;
    }

    .nav-indicator--mobile {
        left: 0;
        bottom: auto;
        height: 3px;
        width: 2.5rem;
        transition:
            top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.2s ease;
    }

    .nav-mobile-panel.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
        z-index: 1;
    }
}

@media (min-width: 2000px) {
    :root {
        --nav-height: 124px;
        --nav-logo-height: 92px;
    }

    body > header {
        padding: 1.5rem 4rem;
    }

    body > header nav.navbar {
        column-gap: 4rem;
    }

    .nav-links {
        gap: 5rem;
    }

    .nav-links a {
        font-size: 1.42rem;
    }

    .nav-cta {
        font-size: 1.28rem;
        min-height: 60px;
        padding: 1.05rem 2rem;
        border-radius: 18px;
    }

    .nav-cta__icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (min-width: 2560px) {
    :root {
        --nav-height: 132px;
        --nav-logo-height: 100px;
    }

    body > header {
        padding: 1.75rem 5rem;
    }

    .nav-links a {
        font-size: 1.52rem;
    }
}

/* Botones base */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: #0a0e14;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #d4b476;
    transform: translateY(-2px);
}

.btn-outline {
    background: #ffffff;
    color: #00b8f2;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-outline:hover,
.btn-outline:focus {
    background: #f0f0f0;
    color: #000000;
}

/* Section Titles (compartidos) */
.section-title-wrap {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.section-title-underline {
    display: block;
    width: 60px;
    height: 5px;
    background: #0CB7F2;
    margin: 0 auto;
}

section {
    padding: var(--section-padding-y, 5rem) 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-inner {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding-left: var(--container-padding, 2rem);
    padding-right: var(--container-padding, 2rem);
    width: 100%;
    box-sizing: border-box;
}

/* Contacto (compartido) */
.contacto-section {
    background: #00b8f2;
    padding: 4rem 2rem;
}

.contacto-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .contacto-inner {
        grid-template-columns: 1fr;
    }
}

.contacto-heading {
    padding-left: 2rem;
}

.contacto-title {
    font-family: "Poppins", sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 0 0;
    line-height: 1.2;
}

.contacto-subtitle {
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.contacto-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .contacto-form-row {
        grid-template-columns: 1fr;
    }
}

.contacto-form .form-group {
    margin-bottom: 1rem;
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: #ffffff;
    border: none;
    color: #1f2937;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 12px;
    box-sizing: border-box;
}

.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
    color: var(--text-muted);
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.contacto-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contacto-form-actions {
    text-align: right;
    margin-top: 0.5rem;
}

.btn-contacto {
    padding: 0.6rem 1.75rem;
    background: #ffffff;
    color: #6b7280;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-contacto:hover {
    background: #f3f4f6;
    color: #4b5563;
}