html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

section {
    padding: 60px 40px;
    scroll-margin-top: 90px;
}

.center {
    text-align: center;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    box-sizing: border-box;
}

header.scrolled {
    position: fixed;
    background: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(6px);
    padding: 10px 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.logo {
    position: relative;
    width: 230px;
    height: 96px;
    margin-left: 100px;
}

.logo img {
    position: absolute;
    top: 0;
    left: 0;
    height: 96px;
    width: auto;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.logo-color {
    opacity: 1;
    filter: none;
}

.logo-white {
    opacity: 0;
    transform: scale(0.95);
    filter: none;
}

header.scrolled .logo-color {
    opacity: 0;
    transform: scale(0.95);
}

header.scrolled .logo-white {
    opacity: 1;
    transform: scale(1);
}

/* Internal pages — always white logo visible */
.pagina-servicios .logo-color,
.pagina-interna .logo-color {
    opacity: 0 !important;
}
.pagina-servicios .logo-white,
.pagina-interna .logo-white {
    opacity: 1 !important;
    transform: scale(1) !important;
    filter: none;
}
/* Single-img logo used on service/internal pages */
.pagina-servicios .logo img:not(.logo-color):not(.logo-white),
.pagina-interna .logo img:not(.logo-color):not(.logo-white) {
    position: relative;
    filter: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-right: 100px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    transition: 0.3s;
}

nav a:hover {
    color: #00AEEF;
}

.dropdown {
    position: relative;
    z-index: 2000;
}

/* Bridge to prevent hover gap */
.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(8, 20, 42, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 8px;
    min-width: 280px;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.45),
        0 0 0 1px rgba(0,174,239,0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,174,239,0.4);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(0,174,239,0.12);
    color: #ffffff;
    padding-left: 16px;
}

.dropdown-menu a:hover::before {
    background: #00AEEF;
    transform: scale(1.4);
}

.btn-nosotros,
.btn-cotiza,
.btn-slider {
    display: inline-block;
    background: rgba(10, 37, 64, 0.95);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-nosotros:hover,
.btn-cotiza:hover,
.btn-slider:hover {
    background: #00AEEF;
    transform: translateY(-3px);
}

.btn-cotiza {
    display: block;
    width: fit-content;
    margin: 20px auto 0 auto;
}

.btn-slider {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.7s;
}

.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 999;
    transition: 0.3s;
}

.whatsapp-btn .text {
    font-size: 14px;
    line-height: 1.2;
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.whatsapp-btn .icon-img {
    width: 28px;
    height: 28px;
}

.pagina-interna header,
.pagina-servicios header {
    position: fixed;
    background: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.pagina-interna,
.pagina-servicios {
    padding-top: 110px;
}

footer {
    background: #07192e;
    color: #fff;
    padding: 0 0 0;
}

.footer-top-bar {
    height: 4px;
    background: linear-gradient(90deg, #00AEEF, #0A2540 60%, #00AEEF);
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.1fr 1.1fr;
    gap: 50px;
    padding: 64px 40px 48px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255,255,255,0.55);
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    margin-bottom: 0 !important;
    transform: none !important;
}

.footer-social a:hover {
    background: #00AEEF;
    border-color: #00AEEF;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

.footer-col h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #00AEEF;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

.footer-col a {
    display: block;
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    font-size: 14px;
    transition: color 0.25s, padding-left 0.25s;
}

.footer-col,
.footer-brand {
    min-width: 0;
}

.footer-col a i.fa-chevron-right {
    font-size: 10px;
    margin-right: 6px;
    color: #00AEEF;
    transition: margin-right 0.25s;
}

.footer-col a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-col a:hover i.fa-chevron-right {
    margin-right: 10px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.footer-contact-item > i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0,174,239,0.12);
    border: 1px solid rgba(0,174,239,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00AEEF;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-item div,
.footer-contact-item p {
    margin: 0;
}

.footer-contact-item a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.25s;
    padding-left: 0 !important;
    overflow-wrap: anywhere;
}

.footer-contact-item a:hover {
    color: #00AEEF;
    padding-left: 0 !important;
}

.footer-logo {
    width: 150px;
    margin-bottom: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 18px 40px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    max-width: 100%;
}

.footer-bottom p {
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 992px) {
    header {
        padding: 14px 18px;
    }

    .logo {
        width: 170px;
        height: 70px;
        margin-left: 0;
    }

    .logo img {
        height: 70px;
    }

    nav {
        margin-right: 0;
        gap: 14px;
    }

    .dropdown-menu {
        min-width: 240px;
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 28px;
        padding: 56px 28px 42px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: 760px;
        margin-bottom: 20px;
    }

    .footer-bottom {
        padding: 16px 28px;
        font-size: 12.5px;
    }
}

@media (max-width: 768px) {
    /* Header: logo centered, hamburger on right */
    header {
        padding: 12px 16px;
        justify-content: center;
    }

    .logo {
        width: 170px;
        height: 70px;
        margin: 0;
    }

    .logo img {
        height: 70px;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Nav hidden by default, slides down when open */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px 0 16px;
        background: rgba(8, 20, 42, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        overflow: visible;
    }

    header.nav-open nav {
        display: flex;
    }

    nav a {
        font-size: 15px;
        padding: 13px 24px;
        text-shadow: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        white-space: normal;
        text-align: center;
    }

    /* Hamburger → ✕ animation */
    header.nav-open .hamburger span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    header.nav-open .hamburger span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    header.nav-open .hamburger span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* Services dropdown collapsed by default on mobile */
    .dropdown {
        position: static;
        width: 100%;
    }

    .dropdown > a {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-menu {
        position: static;
        display: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        background: rgba(255,255,255,0.04);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: unset;
        max-width: 100%;
        box-shadow: none;
    }

    .dropdown.open .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu a {
        padding: 10px 36px;
        font-size: 13.5px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        text-align: left;
    }

    section {
        padding: 52px 20px;
    }

    .pagina-interna,
    .pagina-servicios {
        padding-top: 98px;
    }

    .whatsapp-btn {
        right: 14px;
        bottom: 14px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 46px 22px 34px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-col h3 {
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .footer-col a {
        margin-bottom: 8px;
    }

    .footer-contact-item {
        margin-bottom: 12px;
    }

    .footer-bottom {
        padding: 16px 22px;
        font-size: 12px;
        line-height: 1.55;
    }
}

@media (max-width: 576px) {
    header {
        padding: 10px 14px;
    }

    .logo {
        width: 140px;
        height: 60px;
        margin-left: 0;
    }

    .logo img {
        height: 60px;
    }

    header:not(.scrolled) .logo-white {
        opacity: 0 !important;
    }

    header:not(.scrolled) .logo-color {
        opacity: 1 !important;
    }

    header.scrolled .logo-color {
        opacity: 0 !important;
    }

    header.scrolled .logo-white {
        opacity: 1 !important;
    }

    /* Keep white logo always visible on service and internal pages */
    .pagina-servicios header .logo-color,
    .pagina-interna header .logo-color {
        opacity: 0 !important;
    }

    .pagina-servicios header .logo-white,
    .pagina-interna header .logo-white {
        opacity: 1 !important;
        transform: scale(1) !important;
    }

    h2 {
        font-size: 26px !important;
    }

    .whatsapp-btn {
        padding: 10px 14px;
    }

    .whatsapp-btn .text {
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 30px;
        padding: 48px 24px 36px;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-logo {
        margin-bottom: 14px;
    }

    .footer-col h3 {
        font-size: 12px;
    }

    .footer-col a {
        transform: none !important;
    }

    .footer-contact-item {
        align-items: flex-start;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 16px 16px;
    }
}
