/**
 * EL CORAZÓN DEL CARIBE - UNIFIED DESIGN SYSTEM
 * Premium Travel Brand Styles
 * Compatible con Bootstrap 5 + Hostify Integration
 */

/* ======================================== 1. IMPORTACIONES ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* ======================================== 2. VARIABLES CSS (Design Tokens) ======================================== */
:root {
    --brand: #0b4d7a;
    --brand2: #1c78b3;
    --brand-light: #e0f2fe;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --wa: #25d366;
    --wa-hover: #20bd5a;
    --text: #0f172a;
    --text-light: #475569;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --blur: 12px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --h1: clamp(32px, 5vw, 48px);
    --h2: clamp(24px, 4vw, 36px);
    --h3: clamp(18px, 3vw, 24px);
    --body: 16px;
    --small: 14px;
    --tiny: 12px;
}

/* ======================================== 3. RESET Y BASE ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--body);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: var(--brand2);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--brand);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ======================================== 4. LAYOUT - CONTAINER ======================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 900px;
}

/* ======================================== 5. NAVBAR (ECC-NAVBAR) ======================================== */
.ecc-navbar,
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ecc-navbar nav,
header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: var(--spacing-lg);
}

.ecc-navbar .brand,
header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
    color: var(--brand);
    text-decoration: none;
    transition: opacity 0.2s;
}

.ecc-navbar .brand:hover,
header .brand:hover {
    opacity: 0.8;
}

.ecc-navbar .brand-logo,
header .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.ecc-navbar .brand-name,
header .brand-name {
    display: none;
}

@media (min-width: 640px) {
    .ecc-navbar .brand-name,
    header .brand-name {
        display: none; /* Siempre oculto */
    }
}

/* Menú hamburguesa */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--brand);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.ecc-navbar .menu,
header .menu {
    display: none;
    gap: var(--spacing-sm);
}

/* Menú móvil */
@media (max-width: 767px) {
    .ecc-navbar .menu,
    header .menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }

    .ecc-navbar .menu.active,
    header .menu.active {
        display: flex;
    }

    .ecc-navbar .menu a,
    header .menu a {
        padding: 12px 16px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .ecc-navbar .menu,
    header .menu {
        display: flex;
    }
}

.ecc-navbar .menu a,
header .menu a {
    padding: 8px 16px;
    font-weight: 600;
    font-size: var(--small);
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.ecc-navbar .menu a:hover,
header .menu a:hover {
    background: var(--brand-light);
    color: var(--brand);
}

.ecc-navbar .actions,
header .actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* ======================================== 6. BOTONES (ECC-BTN) ======================================== */
/* Botones de ícono */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.btn-icon.btn-wa {
    background: var(--wa);
    color: white;
}

.btn-icon.btn-wa:hover {
    background: var(--wa-hover);
    transform: scale(1.05);
}

.btn-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--success);
    color: white;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.btn-sm {
    font-size: 14px !important;
    padding: 10px 18px !important;
}

.ecc-btn-primary,
.btn-search,
button[type="submit"]:not(.ecc-btn-secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: var(--small);
    color: white;
    background: var(--brand2);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(28, 120, 179, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ecc-btn-primary:hover,
.btn-search:hover,
button[type="submit"]:not(.ecc-btn-secondary):hover {
    background: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(28, 120, 179, 0.3);
}

.ecc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: var(--small);
    color: var(--brand2);
    background: white;
    border: 2px solid var(--brand2);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ecc-btn-secondary:hover {
    background: var(--brand-light);
    transform: translateY(-2px);
}

.ecc-btn-whatsapp,
.btn-wa,
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: var(--small);
    color: white !important;
    background: var(--wa);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.ecc-btn-whatsapp:hover,
.btn-wa:hover,
.btn-whatsapp:hover {
    background: var(--wa-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    color: white !important;
}

header .btn-wa {
    padding: 10px;
    width: 42px;
    height: 42px;
}

.icon,
.icon-wa {
    width: 20px;
    height: 20px;
}

/* ======================================== 7. HERO (ECC-HERO) ======================================== */
.ecc-hero,
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: 
        linear-gradient(135deg, rgba(11, 77, 122, 0.92) 0%, rgba(28, 120, 179, 0.85) 100%),
        url('/assets/hero.jpg') center/cover no-repeat;
    color: white;
    overflow: hidden;
}

.ecc-hero::before,
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: saturate(1.1) contrast(1.05);
    z-index: 0;
}

.ecc-hero .container,
.hero .container {
    position: relative;
    z-index: 1;
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.ecc-hero-content,
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.ecc-hero-title,
.hero-title {
    font-size: var(--h1);
    font-weight: 900;
    margin: 0 0 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.ecc-hero-subtitle,
.hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 600;
    opacity: 0.95;
    margin: 0;
    line-height: 1.5;
}

/* ======================================== 8. GLASS CARD (ECC-GLASS) ======================================== */
.ecc-glass,
.glass-card,
.search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
}

.search-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ======================================== 9. CARDS (ECC-CARD) ======================================== */
.ecc-card,
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.ecc-card:hover,
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-destination {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.badge-verified {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--tiny);
    font-weight: 700;
}

.card-body {
    padding: var(--spacing-md);
}

.card-body h3 {
    font-size: var(--h3);
    margin: 0 0 8px;
}

.card-body p {
    color: var(--muted);
    margin: 0;
    font-weight: 600;
}

/* ======================================== 10. SECCIONES (ECC-SECTION) ======================================== */
.ecc-section,
section {
    padding: var(--spacing-2xl) 0;
}

.ecc-section-title,
.section-title {
    font-size: var(--h2);
    text-align: center;
    margin: 0 0 12px;
}

.ecc-section-subtitle,
.sub {
    text-align: center;
    color: var(--muted);
    font-weight: 600;
    margin: 0 auto 32px;
    max-width: 70ch;
}

/* ======================================== 11. GRIDS ======================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

@media (min-width: 768px) {
    .two-col {
        grid-template-columns: 1fr 1fr;
    }
}

/* ======================================== 12. BENEFIT CARDS ======================================== */
.benefit-card,
.item {
    padding: var(--spacing-lg);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.benefit-card:hover,
.item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    color: var(--brand2);
    margin-bottom: var(--spacing-md);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
}

.benefit-card h3,
.item h3 {
    font-size: var(--h3);
    margin: 0 0 8px;
}

.benefit-card p,
.item p {
    color: var(--muted);
    margin: 0;
    font-weight: 500;
}

.list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ======================================== 13. CTA BLOCKS ======================================== */
.cta,
.cta-help {
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-radius: var(--radius-lg);
    color: white;
    text-align: center;
}

.cta-content {
    margin-bottom: var(--spacing-lg);
}

.cta-title {
    font-size: var(--h2);
    margin: 0 0 12px;
}

.cta-text {
    margin: 0;
    opacity: 0.95;
    font-weight: 600;
}

/* ======================================== 14. FORMULARIOS ======================================== */
.search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .search {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .search {
        grid-template-columns: repeat(4, 1fr);
    }
}

.search input,
.search select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--small);
    font-weight: 600;
    background: white;
    transition: all 0.2s;
}

.search input:focus,
.search select:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand2);
    box-shadow: 0 0 0 4px rgba(28, 120, 179, 0.1);
}

.search-toggle {
    grid-column: 1 / -1;
}

.search-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: var(--small);
    color: var(--muted);
    cursor: pointer;
}

.search-toggle input[type="checkbox"] {
    width: auto;
}

.search-guests {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.search-advanced {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.btn-search {
    grid-column: 1 / -1;
}

.form-hint {
    grid-column: 1 / -1;
    margin: 0;
    font-size: var(--tiny);
    color: var(--muted);
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ======================================== 15. FOOTER (ECC-FOOTER) ======================================== */
.ecc-footer,
footer {
    background: var(--text);
    color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
}

.ecc-footer .container,
footer .container {
    text-align: center;
}

.ecc-footer p,
footer p {
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

.ecc-footer a,
footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.ecc-footer a:hover,
footer a:hover {
    color: white;
}

/* ======================================== 16. UTILIDADES ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

/* ======================================== 17. RESPONSIVE ======================================== */
@media (max-width: 767px) {
    :root {
        --spacing-2xl: 32px;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .ecc-navbar nav,
    header nav {
        flex-wrap: wrap;
    }
}

/* ======================================== 18. ANIMACIONES ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* ======================================== 19. ACCESIBILIDAD ======================================== */
:focus-visible {
    outline: 3px solid var(--brand2);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
