/* ========================================
        VARIABLES & RESET
        ========================================
        */
:root {
    --primary-dark: #274060;
    --secondary-dark: #335C81;
    --accent-light: #65AFFF;
    --bg-dark: #1B2845;
    --accent-secondary: #5899E2;
    --text-white: #f8fafc;
    --text-gray: #cbd5e1;
    --success: #10b981;
    --error: #ef4444;

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    --radius: 12px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-white);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

/* Utilitarios */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

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

.text-accent {
    color: var(--accent-light);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-light);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(101, 175, 255, 0.4);
}

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

.btn-outline:hover {
    background: rgba(101, 175, 255, 0.1);
    color: white;
    border-color: white;
}

/* ========================================
        NAVBAR
        ========================================
        */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: rgba(27, 40, 69, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(27, 40, 69, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-light);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-gray);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: var(--transition);
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--text-white);
    cursor: pointer;
}

/* ========================================
        HERO SECTION
        ========================================
        */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27, 40, 69, 0.9) 0%, rgba(39, 64, 96, 0.7) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* ========================================
        SERVICIOS
        ========================================
        */
.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.section-header p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--primary-dark);
    padding: 40px 30px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-light);
    opacity: 0.5;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--accent-secondary);
}

.service-card:hover::before {
    opacity: 1;
    width: 6px;
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-light);
    margin-bottom: 25px;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* ========================================
        BENEFICIOS
        ========================================
        */
.benefits {
    background-color: var(--primary-dark);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

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

.benefit-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* ========================================
        WORKFLOW (STEPPER)
        ========================================
        */
.workflow {
    position: relative;
}

.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 50px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-dark);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-light);
    color: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.step:hover .step-number {
    background: var(--accent-light);
    color: var(--bg-dark);
}

.step h4 {
    margin-bottom: 10px;
}

.step p {
    font-size: 0.9rem;
    color: var(--text-gray);
    padding: 0 10px;
}

/* ========================================
        GALLERY
        ========================================
        */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ========================================
        PORTFOLIO / CAROUSEL MANUAL
        ========================================
        */
.projects-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.projects-wrapper::-webkit-scrollbar {
    display: none;
}

.project-card {
    min-width: 300px;
    background: var(--primary-dark);
    border-radius: var(--radius);
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-img {
    height: 180px;
    width: 100%;
}

.project-content {
    padding: 20px;
}

.project-content h4 {
    margin-bottom: 10px;
    color: var(--accent-light);
}

.project-content p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ========================================
        INTERMEDIATE CTA
        ========================================
        */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    text-align: center;
    border-radius: var(--radius);
    margin: 40px auto;
    border: 1px solid var(--accent-secondary);
}

.cta-section h2 {
    margin-bottom: 20px;
}

/* ========================================
        FAQ & TESTIMONIALS
        ========================================
        */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--primary-dark);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
    color: var(--text-gray);
}

.faq-item.active .faq-answer {
    padding-bottom: 20px;
}

/* ========================================
        ABOUT ME
        ========================================
        */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--accent-light);
}

.about-text {
    flex: 1;
}

/* ========================================
        CONTACT SECTION (COMPLEX)
        ========================================
        */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--primary-dark);
    padding: 40px;
    border-radius: var(--radius);
}

.contact-info h3 {
    margin-bottom: 25px;
    color: var(--accent-light);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-top: 5px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--secondary-dark);
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(101, 175, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-align: right;
    margin-top: 5px;
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-control.invalid {
    border-color: var(--error);
}

.form-control.valid {
    border-color: var(--success);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--secondary-dark);
}

/* ========================================
        FOOTER
        ========================================
        */
footer {
    background-color: #111a2e;
    padding: 60px 0 20px;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--accent-light);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-gray);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-light);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--accent-light);
    color: var(--bg-dark);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #64748b;
}

/* ========================================
        RESPONSIVE
        ========================================
        */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
    }

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

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: var(--bg-dark);
        flex-direction: column;
        padding: 40px;
        transition: var(--transition);
        border-left: 1px solid var(--secondary-dark);
    }

    .nav-links.active {
        right: 0;
    }

    .stepper {
        flex-direction: column;
        gap: 30px;
    }

    .stepper::before {
        width: 2px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .step {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: var(--bg-dark);
        padding: 10px 0;
    }

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

/* ==========================================================
           === ESTILOS ESPECÍFICOS: LISTA DE PRECIOS ===
           ========================================================== */

/* Header Compacto para Páginas Internas */
.page-header {
    padding: 160px 0 60px;
    background: linear-gradient(180deg, rgba(27, 40, 69, 1) 0%, rgba(27, 40, 69, 0.8) 100%);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Contenedor de la Tabla */
.pricing-container {
    background: var(--primary-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    /* Para bordes redondeados */
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 40px;
}

/* Estructura Base de Tabla */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
    padding: 20px 25px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Encabezados de Tabla */
.pricing-table thead {
    background-color: rgba(0, 0, 0, 0.2);
}

.pricing-table th {
    font-family: var(--font-heading);
    color: var(--accent-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.pricing-table td {
    font-size: 1rem;
    vertical-align: middle;
}

/* Columna de Precios */
.price-col {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-white);
    text-align: right !important;
    /* Alinear precios a la derecha en desktop */
    width: 180px;
    /* Ancho fijo para alineación */
    white-space: nowrap;
}

/* Filas normales */
.pricing-table tbody tr {
    transition: background-color 0.2s ease;
}

.pricing-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* --- FILA DESTACADA: MÁS VENDIDO --- */
.row-featured {
    background: linear-gradient(90deg, rgba(101, 175, 255, 0.05) 0%, rgba(27, 40, 69, 0) 100%);
    border-left: 4px solid var(--accent-light);
}

.badge-featured {
    display: inline-block;
    background-color: var(--accent-light);
    color: var(--bg-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* --- FILA DESTACADA: EMERGENCIA --- */
.row-emergency {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, rgba(27, 40, 69, 0) 100%);
    border-left: 4px solid var(--error);
}

.badge-emergency {
    display: inline-block;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.row-emergency .price-col {
    color: var(--error);
}

/* Texto descriptivo secundario (ej: lo que incluye el pack) */
.service-details {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 5px;
}

.service-title {
    font-weight: 600;
    display: block;
}

/* Nota al pie de precios */
.pricing-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 20px;
    font-style: italic;
}

/* ========================================
           RESPONSIVE PRECIOS (Transformación a Cards)
        ======================================== */
@media (max-width: 768px) {

    /* Navbar Mobile (Heredado) */
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 75%;
        height: calc(100vh - 70px);
        background: var(--bg-dark);
        flex-direction: column;
        padding: 40px;
        transition: var(--transition);
        border-left: 1px solid var(--secondary-dark);
    }

    .nav-links.active {
        right: 0;
    }

    /* Tabla a Cards */
    .pricing-table,
    .pricing-table tbody,
    .pricing-table tr,
    .pricing-table td {
        display: block;
        width: 100%;
    }

    .pricing-table thead {
        display: none;
        /* Ocultar encabezados en móvil */
    }

    .pricing-table tr {
        margin-bottom: 20px;
        background-color: var(--primary-dark);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        padding: 15px;
        position: relative;
    }

    .pricing-table td {
        padding: 5px 0;
        border: none;
        text-align: left;
    }

    /* Re-ordenar visualmente para móvil */
    .price-col {
        text-align: left !important;
        margin-top: 10px;
        font-size: 1.5rem;
        color: var(--accent-light);
        width: 100%;
    }

    .row-featured {
        border-left: none;
        border-top: 4px solid var(--accent-light);
    }

    .row-emergency {
        border-left: none;
        border-top: 4px solid var(--error);
    }

    .page-header h1 {
        font-size: 2rem;
    }
}