/* Variables CSS */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --text-dark: #111827;
    --text-medium: #374151;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --background-light: #f8fafc;
    --background-lighter: #f1f5f9;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tipografía mejorada */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.025em;
}

p {
    margin-bottom: 1rem;
}

/* Header y Navegación */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

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

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -2px;
    line-height: 1;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -2px;
}

/* Navegación */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    justify-content: space-between;
}

.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

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

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

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

/* Sección Hero */
#hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Botones mejorados */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: center;
}

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

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

.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* Contenido Principal */
main {
    padding: 5rem 0 2rem;
}

section {
    margin-bottom: 6rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 900;
}

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

/* Sección de Estadísticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.stat:hover .stat-icon {
    filter: grayscale(0);
}

.stat h3 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat p {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-weight: 600;
    margin: 0;
}

/* Sección de Servicios */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.service-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

.service-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-card ul li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 900;
    font-size: 1.1rem;
}

.service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tag {
    background: var(--background-lighter);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Información de Contacto */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.contact-item {
    background: var(--background-light);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-item:hover::before {
    transform: scaleX(1);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.contact-item:hover .contact-icon {
    filter: grayscale(0);
}

.contact-item h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-item p {
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Call to Action */
.cta-section {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 20c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20z'/%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer mejorado */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    position: relative;
}

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

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-logo h3 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.footer-logo p {
    color: var(--text-lighter);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: var(--text-lighter);
    line-height: 1.6;
}

.footer-contact strong {
    color: var(--white);
}

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

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* Botón Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header móvil */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 12px 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        padding: 1rem 0;
    }
    
    .nav-menu.nav-menu-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-menu li {
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    /* Hero móvil */
    #hero {
        padding: 120px 0 80px;
        min-height: 90vh;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Contenido móvil */
    main {
        padding: 3rem 0 1rem;
    }
    
    section {
        margin-bottom: 4rem;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .services-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat {
        padding: 2rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 2rem;
    }
    
    .cta-section {
        padding: 3rem 1.5rem;
        margin-top: 3rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    #hero {
        padding: 100px 0 60px;
    }
    
    .hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 3rem;
    }
    
    .stat {
        padding: 1.5rem;
    }
    
    .stat h3 {
        font-size: 3rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
        border-radius: 16px;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-badge {
    animation: pulse 2s infinite;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus states para accesibilidad */
a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print styles */
@media print {
    header, footer, .nav-toggle, .scroll-to-top, .cta-section {
        display: none;
    }
    
    main {
        padding-top: 0;
    }
    
    .service-card, .stat, .contact-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 