/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

* {
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
    color: #1a1a1a;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

ul, ol {
    list-style: none;
}

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

/* Base Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Main Header Styles (Public) */
header {
    width: 100%;
    height: 64px;
    flex-shrink: 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2000; /* Elevado para superar al mapa */
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.025em;
}

/* Botón Comenzar */
.btn-comenzar {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-comenzar:hover {
    background-color: #374151;
}

/* Menú Hamburguesa Móvil */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0.5rem;
}

/* Desplegable tipo Elementor */
.mobile-dropdown {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
    z-index: 99;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.mobile-dropdown.open {
    display: block;
    animation: menuSlideDown 0.3s ease-out;
}

@keyframes menuSlideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

/* User Dropdown */
.user-menu {
    position: relative;
    display: flex;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 200px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    z-index: 101;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f9fafb;
    color: #1a1a1a;
}

.dropdown-item svg {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Main Footer Styles */
footer {
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: auto;
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: #6b7280;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #1a1a1a;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    font-size: 1.25rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.social-link:hover {
    color: #1a1a1a;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100dvh;
    overflow: hidden;
    background-color: #f9fafb;
}

/* Mobile Header */
.dashboard-mobile-header {
    display: none;
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
    width: 100%;
}

.sidebar {
    width: 280px;
    height: 100%;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
}

.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.sidebar-logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.025em;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4b5563;
}

.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: #f3f4f6;
    color: #1a1a1a;
}

.sidebar-link svg {
    font-size: 1.25rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.sidebar-user:hover {
    background-color: #f9fafb;
}

.user-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

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

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        transform: translateX(-100%);
        box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .close-sidebar {
        display: block;
    }

    .dashboard-main {
        padding: 1.5rem;
    }
}

/* Auth Styles (Centered Card) */
.auth-page {
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    min-height: calc(100dvh - 64px - 80px); /* Ajuste para header y footer */
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    color: #9ca3af;
    font-size: 1.25rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.btn-auth {
    width: 100%;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.btn-auth:hover {
    background-color: #374151;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-link {
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    padding: 6rem 1rem;
    background-color: #ffffff;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-motto {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: #1a1a1a;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.btn-hero-primary:hover {
    background-color: #374151;
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background-color: #f3f4f6;
    color: #1a1a1a;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.btn-hero-secondary:hover {
    background-color: #e5e7eb;
}

/* Steps Section */
.steps-section {
    padding: 6rem 1rem;
    background-color: #f9fafb;
}

.steps-section h2, .audience-section h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

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

.step-icon {
    width: 64px;
    height: 64px;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.step-card p {
    color: #6b7280;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.25rem; /* Ajustado para mejor legibilidad móvil */
    }

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

    .steps-section h2, .audience-section h2 {
        font-size: 1.75rem; /* Tamaño adecuado para móviles */
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

/* Audience Section (Para Quién) */
.audience-section {
    padding: 6rem 1rem;
    background-color: #f9fafb;
    text-align: center;
}

.section-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 1rem;
    display: block;
}

.audience-heading {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.audience-card {
    background: #ffffff;
    padding: 3.5rem;
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.audience-card h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.audience-card p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    flex-grow: 1;
    font-size: 1.0625rem;
    max-width: 100%;
}

.btn-card-cta {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 0.875rem 2.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s;
    display: inline-block;
    align-self: center;
}

.audience-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.btn-card-cta:hover {
    background-color: #374151;
}

.section-closure {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .audience-grid {
        grid-template-columns: 1fr;
    }
    
    .audience-card {
        padding: 2.5rem 2rem;
    }

    .audience-heading {
        font-size: 2rem;
    }

    .audience-card h3 {
        font-size: 1.5rem;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.fw-bold {
    font-weight: bold;
}

.text-muted {
    color: #6c757d;
}

/* Public Navigation Refined */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4b5563;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1a1a1a;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    color: rgb(75, 85, 99);
    font-weight: 500;
    margin-bottom: 0.25rem;
    gap: 0.75rem;
    padding: 0rem;
    border-radius: 0.5rem;
    transition: 0.2s;
}

/* Universal Mobile Dropdown Menu (Elementor Style) */
.mobile-dropdown {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 1.5rem;
    z-index: 999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.mobile-dropdown.open {
    display: block;
    animation: menuSlideDown 0.3s ease-out;
}

@keyframes menuSlideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.mobile-nav-content .nav-link {
    font-size: 1.125rem;
    width: 100%;
    text-align: left;
}

.mobile-nav-content .btn-comenzar {
    width: 100%;
    justify-content: center;
    text-align: center;
}

@media (max-width: 1024px) {
    .nav-desktop {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: block !important;
    }
}