/* ============================================
   GOPENUX - Common Styles
   ============================================
   Archivo CSS compartido entre todas las páginas
   para mejorar el rendimiento (cache del navegador)
*/

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

/* Semantic tags - Remove default browser styling */
abbr[title],
dfn {
    text-decoration: none;
    border-bottom: none;
    cursor: inherit;
}

/* CSS Variables */
:root {
    --primary: #6B46C1;
    --primary-dark: #5B3AA1;
    --primary-light: #7C3AED;
    --gold: #F59E0B;
    --dark: #0F0A1F;
    --dark-secondary: #1A1333;
    --gray: #B0B8C4;
    --gray-light: #E5E7EB;
}

/* Body Base */
body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: #fff;
    overflow-x: hidden;
}

/* Skip Link - Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible - Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Remove default outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Logo Styles
   ============================================ */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-main {
    font-family: 'Archivo', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #6B46C1;
    letter-spacing: 2px;
    line-height: 0.95;
    text-transform: uppercase;
    text-align: center;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
    paint-order: stroke fill;
}

.logo-tagline {
    font-family: 'Rexlia', 'Rajdhani', 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #6B46C1;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 4px;
    text-align: center;
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.25);
    paint-order: stroke fill;
}

/* ============================================
   Navigation
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 10, 31, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Dropdown de Servicios */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 10, 31, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 0.75rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    list-style: none;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu li a:focus {
    background: rgba(124, 58, 237, 0.15);
    color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-dropdown-menu li a:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    padding-left: 1.75rem;
}

/* CTA en navegación */
.nav-cta-wrapper {
    margin-left: 0.5rem;
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--dark-secondary);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-section p,
.footer-section a {
    color: var(--gray);
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--gray);
}

.footer-bottom a {
    color: var(--gray);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* Footer Logo Adjustment */
footer .logo {
    margin-bottom: 1.5rem;
    margin-left: -20px;
}

footer .logo-main {
    font-family: 'Archivo', sans-serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
}

footer .logo-tagline {
    font-family: 'Rexlia', 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 4px;
}

/* ============================================
   Mobile Menu (Hamburger)
   ============================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-light);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Responsive - Mobile (768px)
   ============================================ */
@media (max-width: 768px) {
    .logo-main {
        font-family: 'Archivo', sans-serif;
        font-size: 36px;
        font-weight: 700;
        letter-spacing: 1.5px;
    }

    .logo-tagline {
        font-family: 'Rexlia', 'Space Grotesk', sans-serif;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 3.8px;
        margin-top: 3px;
    }

    footer .logo-main {
        font-family: 'Archivo', sans-serif;
        font-size: 34px;
        font-weight: 700;
        letter-spacing: 1.8px;
    }

    footer .logo-tagline {
        font-family: 'Rexlia', 'Space Grotesk', sans-serif;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 3.5px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 10, 31, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 0;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(124, 58, 237, 0.2);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

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

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links li.nav-cta-wrapper {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1.25rem 0;
        font-size: 1.1rem;
    }

    /* Dropdown en móvil */
    .nav-dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        display: none !important;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        padding-left: 1rem;
        min-width: auto;
    }

    /* Desactivar hover en móvil */
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none !important;
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block !important;
    }

    .nav-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .nav-dropdown-menu li {
        border-bottom: none;
    }

    .nav-dropdown-menu li a {
        padding: 0.75rem 0;
        font-size: 0.95rem;
        color: var(--gray);
    }

    .nav-dropdown-menu li a:hover {
        padding-left: 0.5rem;
    }

    /* CTA en móvil */
    .nav-cta-wrapper {
        margin-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .nav-cta {
        display: block;
        text-align: center;
        padding: 1rem;
    }

    .nav-container {
        padding: 1.25rem 1rem;
    }

    footer {
        padding: 3rem 1rem 1.5rem;
    }

    .footer-content {
        gap: 2rem;
    }
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Common Typography & Page Elements
   ============================================ */
h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
}

.nav-links a.active {
    color: var(--primary);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    margin-top: 100px;
    position: relative;
    z-index: 1;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    color: var(--gray);
    font-size: 1.1rem;
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb [aria-current="page"] {
    color: var(--primary-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 1rem;
        margin-top: 80px;
    }

    .breadcrumb ol {
        font-size: 0.85rem;
    }
}
