/**
 * Header Component Styles
 * Dedicated styles for header/navigation
 */

/* ===========================================
   Base Header
   =========================================== */
.csm-header {
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner flex container */
.csm-header > .wp-block-group {
    width: 100%;
}

/* ===========================================
   Logo
   =========================================== */
.csm-logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo image - Inherit size from HTML */
.csm-logo-image,
.csm-logo-image.wp-block-image,
figure.csm-logo-image,
figure.wp-block-image.csm-logo-image,
figure.wp-block-image.is-resized.csm-logo-image {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
}

.csm-logo-image img,
figure.csm-logo-image img,
figure.wp-block-image.csm-logo-image img,
.csm-logo-image.is-resized img {
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    display: block !important;
}

/* Logo text */
.csm-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.csm-site-title-text {
    line-height: 1;
}

.csm-logo-subtitle {
    line-height: 1;
}

/* ===========================================
   Navigation
   =========================================== */
.csm-nav-desktop {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.csm-nav-links {
    display: flex;
    align-items: center;
}

/* Underline hover only for nav links, NOT the button */
.csm-nav-links a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.csm-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.csm-nav-links a:hover::after {
    width: 100%;
}

/* Reservar button - no underline, proper hover */
.csm-btn-reservar .wp-block-button__link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.csm-btn-reservar .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 70, 62, 0.3);
}

.csm-btn-reservar .wp-block-button__link::after {
    display: none !important;
}

/* Mobile navigation toggle - hidden by default on desktop */
.csm-nav-mobile {
    display: none !important;
}

.csm-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--csm-primary, #2D463E);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1023px) {
    .csm-nav-desktop {
        display: none !important;
    }
    .csm-nav-mobile {
        display: block !important;
    }

    .csm-header {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .csm-logo-image img {
        width: 44px !important;
        height: 44px !important;
    }

    .csm-site-title-text {
        font-size: 1.125rem !important;
    }

    .csm-logo-subtitle {
        font-size: 0.5rem !important;
    }
}

/* ===========================================
   Mobile Menu Overlay
   =========================================== */
.csm-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.csm-mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ===========================================
   Mobile Menu Panel
   =========================================== */
.csm-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: #2D463E;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transition: right 0.3s ease, visibility 0.3s ease, opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.csm-mobile-menu.is-open {
    right: 0;
    visibility: visible;
    opacity: 1;
}

/* Mobile Menu Header */
.csm-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.csm-mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.csm-mobile-menu-logo img {
    width: 32px;
    height: 32px;
}

.csm-mobile-menu-title {
    color: #ffffff;
    font-family: var(--wp--preset--font-family--serif, Georgia, serif);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.csm-mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.csm-mobile-menu-close:hover,
.csm-mobile-menu-close:focus {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Navigation */
.csm-mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.csm-mobile-menu-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 1.25rem;
    transition: background 0.2s ease;
}

.csm-mobile-menu-nav a:hover,
.csm-mobile-menu-nav a:focus {
    background: rgba(255, 255, 255, 0.08);
}

/* Mobile Menu Footer */
.csm-mobile-menu-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.csm-mobile-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.csm-mobile-menu-cta:hover {
    background: #1da851;
}

.csm-mobile-menu-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.csm-mobile-menu-phone:hover {
    color: #ffffff;
}
