/* ============================================
   LA GRÁFICA TENERIFE - HEADER STYLES
   ============================================ */

/* ============================================
   BASE HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: none;
    top: var(--wp-admin--admin-bar--height, 0);
}

.site-header.scrolled {
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* ============================================
   LOGO
   ============================================ */
.site-logo {
    z-index: 1001;
}

.site-header .site-logo img.custom-logo {
    max-height: 55px !important;
    width: auto !important;
    display: block;
    transition: transform 0.3s ease;
}

.site-logo:hover .custom-logo {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .site-header .site-logo img.custom-logo {
        max-height: 40px !important;
    }
}

/* ============================================
   NAVEGACIÓN PRINCIPAL
   ============================================ */
.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

#primary-menu > li {
    position: relative;
}

#primary-menu > li > a {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
    color: #00B4D8;
}

/* ============================================
   MEGA MENÚ - SERVICIOS
   ============================================ */
#primary-menu li.menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

#primary-menu li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.sub-menu,
#primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    min-width: 600px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

#primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    list-style: none;
}

.sub-menu > li > a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-heading);
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.sub-menu > li > a:hover {
    color: #00B4D8;
    padding-left: 5px;
}

.sub-menu .sub-menu {
    position: static;
    box-shadow: none;
    padding: 0 0 0 15px;
    min-width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: block;
}

/* ============================================
   BOTONES CTA
   ============================================ */
.header-cta {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1001;
}

.btn-cotiza {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #00B4D8;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cotiza:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    color: #FFFFFF;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #25D366;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    color: #FFFFFF;
}

.btn-whatsapp i {
    font-size: 18px;
}

/* ============================================
   HAMBURGER MENU (MOBILE)
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-heading);
    transition: all 0.3s ease;
    margin: 3px 0;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-heading);
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu .logo-text {
    font-size: 20px;
}

#mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobile-menu > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#mobile-menu > li > a {
    display: block;
    padding: 15px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
}

#mobile-menu .sub-menu {
    display: none;
    padding: 0 0 0 20px;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    position: static;
    min-width: auto;
    border-radius: 0;
}

#mobile-menu .sub-menu.open {
    display: block;
}

#mobile-menu .sub-menu a {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 0;
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .main-navigation {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-inner {
        height: 70px;
    }
}

@media (max-width: 576px) {
    .header-inner {
        height: 60px;
    }

    .logo-text {
        font-size: 18px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
    }

    .hamburger-line {
        width: 20px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .header-inner > * {
    animation: fadeInDown 0.5s ease forwards;
}

.site-logo {
    animation-delay: 0.1s;
}

.main-navigation {
    animation-delay: 0.2s;
}

.header-cta {
    animation-delay: 0.3s;
}

/* ============================================
   DARK / LIGHT MODE TOGGLE
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--card-border);
    background: transparent;
    color: var(--text-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    transform: rotate(20deg);
}

.theme-toggle i {
    pointer-events: none;
}

/* Wrapper mobile: toggle + hamburger juntos */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1001;
}

/* En móvil mostrar el toggle junto al hamburger */
@media (max-width: 991px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .mobile-header-actions {
        display: flex;
    }
}