@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0b132b;
    --bg-darker: #070d1e;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(40, 53, 76, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(6, 182, 212, 0.4);

    --primary-cyan: #06b6d4;
    --primary-cyan-glow: rgba(6, 182, 212, 0.25);
    --accent-amber: #f59e0b;
    --accent-amber-light: #fbbf24;
    --accent-amber-glow: rgba(245, 158, 11, 0.3);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 65%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header & Glassmorphism Navigation */
header {
    background: rgba(11, 19, 43, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* WhatsApp Header Button Styling */
.btn-whatsapp-header {
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast), background-color var(--transition-fast);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-whatsapp-header:hover {
    background-color: #20ba5a !important;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 44px;
    width: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
    transition: transform var(--transition-bounce), filter var(--transition-fast);
}

.logo-brand:hover .logo-img {
    transform: scale(1.1) rotate(4deg);
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.7));
}

.logo-brand {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Navigation Menu */
nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.02rem;
    padding: 9px 18px;
    border-radius: 12px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

/* Caret Dropdown */
.caret {
    font-size: 0.7rem;
    color: var(--primary-cyan);
    transition: transform var(--transition-fast);
}

.dropdown:hover>.dropdown-toggle .caret,
.dropdown.open>.dropdown-toggle .caret {
    transform: rotate(180deg);
}

/* Dropdown Menu Styling */
.dropdown-menu {
    display: none;
    position: absolute;
    /* top: calc(100% + 8px); */
    left: 0;
    min-width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.1);
    padding: 10px;
    z-index: 1100;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover>.dropdown-menu,
.dropdown.open>.dropdown-menu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 11px 16px;
    font-size: 0.94rem;
    font-weight: 500;
    border-radius: 10px;
    color: var(--text-muted);
    width: 100%;
    border: 1px solid transparent;
}

.dropdown-menu a:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

/* Submenu dropdown */
.dropdown-sub {
    position: relative;
}

.dropdown-sub-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.caret-right {
    font-size: 0.65rem;
    color: var(--primary-cyan);
    margin-left: 8px;
    transition: transform var(--transition-fast);
}

.dropdown-sub:hover>.dropdown-sub-toggle .caret-right,
.dropdown-sub.open>.dropdown-sub-toggle .caret-right {
    transform: rotate(90deg);
}

.dropdown-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    min-width: 250px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    padding: 10px;
    z-index: 1200;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-sub:hover>.dropdown-submenu,
.dropdown-sub.open>.dropdown-submenu {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.dropdown-submenu a {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 10px;
}

.dropdown-submenu a:hover {
    background: rgba(6, 182, 212, 0.15);
    color: #ffffff;
}

/* Mobile Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1200;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--accent-amber));
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 90px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(11, 19, 43, 0.9) 100%),
        radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero h2,
.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-amber-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 16px auto;
    text-align: center;
    line-height: 1.8;
}

.hero p strong {
    color: var(--text-main);
}

.hero div {
    max-width: 820px;
    margin: 0 auto 36px auto;
}

.hero picture {
    display: block;
    max-width: 720px;
    margin: 0 auto 36px auto;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(6, 182, 212, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(6, 182, 212, 0.1);
    object-fit: cover;
    transition: transform 0.4s ease, box-shadow 0.4s ease;

    width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
    margin-bottom: 10px;
}

.hero-img:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(6, 182, 212, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-amber), #d97706);
    color: #000000;
    font-family: var(--font-heading);
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn:hover::after {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.5);
    color: #000000;
}

/* Section Headers */
.titulo_index {
    max-width: 1240px;
    margin: 50px auto 20px auto;
    padding: 0 24px;
}

.titulo_index h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0;
}

.titulo_index h2::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-cyan), var(--accent-amber));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--primary-cyan);
}

/* Cards Section - CSS Grid */
.cards {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), transparent);
    opacity: 0.4;
    transition: opacity var(--transition-fast), height var(--transition-fast);
}

.card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.15);
}

.card:hover::before {
    opacity: 1;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--accent-amber));
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-cyan);
    margin-bottom: 12px;
}

.card p {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.card a {
    text-decoration: none;
    color: var(--primary-cyan);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    transition: color var(--transition-fast);
}

.card a:hover {
    color: var(--accent-amber-light);
}

.card li {
    margin-left: 20px;
    color: var(--text-muted);
}

/* Contenedor Section (Pages like servicios.html) */
.contenedor {
    padding: 60px 24px;
    max-width: 1140px;
    margin: 0 auto;
}

.contenedor h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 35px;
    background: linear-gradient(135deg, #ffffff, var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
}

.contenedor h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 35px;
    background: linear-gradient(135deg, #ffffff, var(--accent-amber-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
}

.contenedor .card {
    margin-bottom: 20px;
}

/* Footer Styling */
footer {
    margin-top: 80px;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
    padding: 35px 24px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
}

footer p {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

footer a {
    color: var(--text-muted);
    margin: 0 10px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--primary-cyan);
    text-decoration: underline;
}

/* Responsive Rules */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.4rem;
    }

    .cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        gap: 10px;
    }

    .hamburger {
        display: flex;
        order: 10;
    }

    .btn-whatsapp-header {
        padding: 9px 15px !important;
        font-size: 14px !important;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 19, 43, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    }

    .nav-menu.active {
        max-height: 85vh;
        overflow-y: auto;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 15px 0;
    }

    .nav-menu a {
        padding: 14px 28px;
        border-radius: 0;
        border: none;
        border-left: 3px solid transparent;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        border-left-color: var(--primary-cyan);
        background: rgba(6, 182, 212, 0.1);
        box-shadow: none;
    }

    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: rgba(7, 13, 30, 0.8);
        padding: 0;
        border: none;
        border-radius: 0;
    }

    .dropdown.open>.dropdown-menu {
        display: flex;
    }

    .dropdown-menu a {
        padding-left: 48px;
    }

    .dropdown-submenu {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: rgba(5, 9, 20, 0.9);
        padding: 0;
        border: none;
        border-radius: 0;
    }

    .dropdown-sub.open>.dropdown-submenu {
        display: flex;
    }

    .dropdown-submenu a {
        padding-left: 68px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 14px;
    }

    .header-container {
        gap: 6px;
    }

    .logo-brand {
        gap: 8px;
    }

    .logo-brand h1 {
        font-size: 1.15rem;
    }

    .logo-img {
        height: 36px;
        width: 36px;
    }

    .btn-whatsapp-header {
        padding: 7px 10px !important;
        font-size: 12.5px !important;
        border-radius: 6px !important;
    }
}