/* --- Variables y Reset --- */
:root {
    --primary-color: #051024;
    /* Azul Marino Profundo (Corporativo) */
    --accent-color: #D4AF37;
    /* Dorado Premium (Corporativo) */
    --accent-hover: #b8952c;
    /* Dorado ligeramente más oscuro para hover */
    --text-dark: #1E293B;
    --text-light: #f4f4f4;
    --bg-light: #F8F9FA;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden; /* Prevenir scroll horizontal en todo el sitio */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Utilidades --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color); /* Texto en azul marino hace contraste con el dorado */
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4); /* Glow dorado suave */
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--accent-color);
}

/* --- Navbar --- */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Changed from fixed to relative to stop scrolling with page */
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between; /* Distribuye el logo a la izquierda y el menú a la derecha */
    align-items: center;
    height: 70px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    background-color: transparent;
    padding: 0;
}

.gold-metallic-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
    background: linear-gradient(to right, #D4AF37, #FFF2CD, #D4AF37, #AA771C);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.logo-img {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 50%; /* Transforma la imagen cuadrada negra en un sello circular perfecto */
    display: block;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4); /* Glow dorado premium */
    border: 2px solid var(--accent-color);
}

.footer-logo {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 50%; /* Mismo tratamiento circular para el logo del footer */
    margin-bottom: 20px;
    background-color: transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    /* Eliminado: left: -20px que rompía el layout en móvil */
}

.nav-menu {
    display: flex;
    gap: 25px; /* Espaciado premium */
    align-items: center; /* Alineación perfecta con el botón CTA */
}

.nav-link {
    font-weight: 500;
    color: var(--text-light); /* Blanco sobre Navy */
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-color); /* Hover dorado */
}

/* Botón Contacto en Navbar */
.btn-nav {
    background-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
    padding: 10px 25px !important;
    border-radius: 50px !important; /* Estilo píldora */
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-nav:hover {
    background-color: var(--accent-hover) !important;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--accent-color); /* Hamburguesa dorada */
    transition: var(--transition);
}

/* Animación del icono de hamburguesa a "X" */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

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

/* --- Hero Section --- */
.hero {
    background-image: url('img/modern-hero.png');
    /* Nueva imagen de Mansión Twilight */
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    /* margin-top removed since navbar is relative now */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 16, 36, 0.75);
    /* Capa azul marino oscuro elegante */
}

.hero-top-brand {
    position: absolute;
    top: 22%; /* Flotando en el centro del cielo, arriba del techo, como en el mockup */
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.hero-title-brand {
    font-size: 4.5rem !important;
    letter-spacing: 5px !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Secciones Generales --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 40px;
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- About Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    padding: 20px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- Pricing Cards --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.pricing-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    border: 2px solid var(--accent-color);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.08);
}

.card-header {
    background: var(--bg-light);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    color: var(--primary-color);
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.badge {
    background: #e2e8f0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.badge.popular {
    background: var(--accent-color);
    color: var(--white);
}

.card-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ideal-for {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.card-body ul {
    margin-bottom: 30px;
    flex: 1;
}

.card-body li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body li i {
    color: var(--accent-color);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    /* Desktop: máximo 3 columnas en primera fila, centrando la última */
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}



.service-card {
    background: var(--white);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.service-card .card-actions {
    width: 100%;
    margin-top: auto;
}

/* Botones dentro de tarjetas de servicio - texto wrap permitido */
.service-card .btn-app-plan,
.service-card .btn-wa-plan {
    white-space: normal;       /* Permite salto de línea */
    word-break: break-word;
    padding: 10px 12px;
    font-size: 0.85rem;
    letter-spacing: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.service-card .btn-app-plan i,
.service-card .btn-wa-plan i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.service-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- Footer --- */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* --- Floating Social Media Icons --- */
.social-floating {
    position: fixed;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

/* App Icon Wrapper (for tooltip positioning) */
.social-app-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Tooltip "Mi Panel" */
.social-app-tooltip {
    position: absolute;
    right: 62px;
    background: var(--primary-color);
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-color);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.social-app-wrapper:hover .social-app-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* App Floating Icon */
.social-app {
    width: 50px;
    height: 50px;
    padding: 0;
    background: var(--primary-color);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5), 0 4px 10px rgba(0,0,0,0.3);
    animation: appIconGlow 2.5s ease-in-out infinite;
    overflow: hidden;
}

.social-app:hover {
    animation: none;
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.8), 0 6px 18px rgba(0,0,0,0.4);
    transform: scale(1.12) translateY(-3px);
}

@keyframes appIconGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.4), 0 4px 10px rgba(0,0,0,0.25);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.75), 0 4px 14px rgba(0,0,0,0.3);
    }
}

.social-app-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-icon:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.social-icon:active {
    transform: scale(0.95);
}

/* Colores de Redes Sociales */
.social-icon.facebook {
    background-color: #1877F2;
}

.social-icon.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-icon.tiktok {
    background-color: #000000;
}

.social-icon.tiktok i {
    text-shadow: 1.5px 1.5px 0px #FE2C55, -1.5px -1.5px 0px #25F4EE;
}

.social-icon.whatsapp {
    background-color: #25D366;
}

.social-icon.email {
    background-color: var(--accent-color);
    color: var(--primary-color);
}
/* --- App Integration: Botón "Mi Panel" en Navbar --- */
.btn-nav-panel {
    background: transparent !important;
    color: var(--accent-color) !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    border: 2px solid var(--accent-color) !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-nav-panel:hover {
    background: var(--accent-color) !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

/* --- App Integration: Hero CTA Group --- */
.hero-cta-group {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-panel-hero {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.btn-panel-hero:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    animation: none;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.15);
    }
}

/* --- App Integration: Card Actions (Dual Buttons) --- */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn-app-plan {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: var(--accent-color);
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.btn-app-plan:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-app-featured {
    background: var(--primary-color);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-app-featured:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-app-premium {
    background: #14532d;
    color: var(--white);
    border-color: #14532d;
}

.btn-app-premium:hover {
    background: #166534;
    border-color: #166534;
    box-shadow: 0 4px 12px rgba(20, 83, 45, 0.4);
}

.btn-wa-plan {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    background: transparent;
    color: #25D366;
    border: 2px solid #25D366;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.btn-wa-plan:hover {
    background: #25D366;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-wa-premium {
    color: #14532d;
    border-color: #14532d;
}

.btn-wa-premium:hover {
    background: #14532d;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(20, 83, 45, 0.35);
}

/* ================================================================
   RESPONSIVE — Tablets (max 992px)
   ================================================================ */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }

    /* Services: 3 columnas en tablet también está bien,
       pero si el espacio aprieta lo manejamos desde 768 */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ================================================================
   RESPONSIVE — Móvil grande / tablet pequeña (max 768px)
   ================================================================ */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 16px;
    }

    /* ---- Navbar ---- */
    .navbar .container {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
        z-index: 1002;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary-color);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 10px 15px rgba(0, 0, 0, 0.5);
        padding: 30px 0;
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 20px 0;
    }

    .nav-menu li a {
        font-size: 1.1rem;
        display: block;
        padding: 10px;
    }

    /* ---- Secciones ---- */
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    /* ---- Hero ---- */
    .hero {
        min-height: 100svh;
        flex-direction: column;
    }

    .hero-top-brand {
        position: relative;
        top: auto;
        margin-bottom: 15px;
    }

    .hero-title-brand {
        font-size: 2.8rem !important;
        letter-spacing: 2px !important;
    }

    .hero h1 {
        font-size: 2rem;
        padding: 0 15px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 20px;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 12px;
        padding: 0 20px;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    /* ---- Footer ---- */
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 40px;
    }

    .footer-logo {
        margin: 0 auto 15px auto;
    }

    /* ---- Pricing Cards ---- */
    .pricing-card.featured {
        transform: scale(1); /* Desactivar crecimiento en móviles */
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    /* ---- Features Grid ---- */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* ---- Services Grid: 1 columna en móvil ---- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }

    .service-card {
        padding: 24px 20px;
    }

    /* Botones de servicio: tamaño normal con texto completo */
    .service-card .btn-app-plan,
    .service-card .btn-wa-plan {
        font-size: 0.9rem;
        padding: 11px 16px;
        white-space: nowrap;
    }

    /* ---- Iconos sociales flotantes ---- */
    .social-floating {
        bottom: 20px;
        right: 12px;
        gap: 8px;
    }

    .social-app {
        width: 42px;
        height: 42px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
}

/* ================================================================
   RESPONSIVE — Móvil pequeño (max 480px)
   ================================================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

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

    .hero-title-brand {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

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

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .price {
        font-size: 2rem;
    }

    /* Features: 1 columna en móvil muy pequeño */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Services: ancho completo sin restricción de max-width */
    .services-grid {
        max-width: 100%;
    }

    /* Botones de servicios: wrap permitido en pantallas muy pequeñas */
    .service-card .btn-app-plan,
    .service-card .btn-wa-plan {
        font-size: 0.82rem;
        padding: 10px 10px;
        white-space: normal;
    }

    /* Hero CTA */
    .btn-panel-hero {
        font-size: 0.95rem;
        padding: 13px 25px;
    }

    /* Iconos sociales aún más pequeños */
    .social-floating {
        right: 8px;
        gap: 7px;
    }

    .social-app {
        width: 38px;
        height: 38px;
    }

    .social-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    /* Footer bottom: wrap del teléfono y email */
    .footer-bottom div {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Nota de servicios: texto más pequeño */
    #servicios > .container > p.text-center {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
}

/* ================================================================
   RESPONSIVE — Pantallas muy pequeñas (max 360px)
   ================================================================ */
@media (max-width: 360px) {
    .hero-title-brand {
        font-size: 1.9rem !important;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.55rem;
    }

    .social-floating {
        right: 6px;
    }

    .social-app {
        width: 34px;
        height: 34px;
    }

    .social-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}