/* css/styles.css */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title-center h2:after {
    left: 50%;
    transform: translateX(-50%);
}

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

section {
    padding: 100px 0;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 10px;
}

.logo-icon img {
    width: 70%;
    height: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.logo-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

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

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

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

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    background: var(--gradient-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600" opacity="0.1"><path d="M0 0h1200v600H0z" fill="none"/><path d="M0 300l1200-300v600L0 300z" fill="%23fff"/></svg>');
    background-size: cover;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    max-width: 600px;
}

.hero-visual {
    flex: 1;
    position: relative;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: -30px;
    right: 30px;
    width: 180px;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 150px;
    right: -30px;
    width: 220px;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 30px;
    right: 100px;
    width: 160px;
    animation-delay: 4s;
}

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

.stats-container {
    display: flex;
    gap: 40px;
    margin-top: 60px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Services Section */
.services {
    background-color: #f8fafc;
}

.section-title-center {
    text-align: center;
    margin-bottom: 60px;
}

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

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    z-index: 2;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: white;
    font-size: 1.8rem;
}

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

.service-description {
    color: var(--gray-color);
    margin-bottom: 20px;
}

/* Interactive SEO Tools */
.seo-tools {
    background: var(--gradient-dark);
    color: white;
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.tool-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.tool-description {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.tool-features {
    list-style: none;
}

.tool-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.tool-features li i {
    color: var(--accent-color);
}

/* Testimonials */
.testimonials-slider {
    max-width: 800px;
    margin: 60px auto 0;
    position: relative;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin: 0 15px;
    position: relative;
}

.testimonial-card:before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.rating {
    color: #fbbf24;
    margin-top: 5px;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 60px auto 0;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.faq-question i {
    transition: var(--transition);
}

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

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 500px;
}

/* Contact Section */
.contact {
    background: var(--gradient-dark);
    color: white;
}

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

.contact-info h2 {
    color: white;
}

.contact-info h2:after {
    background: var(--accent-color);
}

.contact-details {
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-text h4 {
    margin-bottom: 5px;
    color: white;
}

.contact-text p {
    color: #cbd5e1;
}

.business-hours {
    margin-top: 40px;
}

.hours-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
}

.hours-list {
    list-style: none;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 80px 0 40px;
}

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

.footer-logo {
    margin-bottom: 20px;
}

.footer-description {
    margin-bottom: 25px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

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

/* Dark/Light Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    border: none;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle {
    z-index: 10000 !important; /* Mayor que el cookie banner (9999) */
}

/* Feedback táctil mejorado */
.theme-toggle:active {
    transform: scale(0.95) !important;
}

/* Prevenir problemas de selección en móvil */
.theme-toggle {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* Para móvil */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* Si hay cookie banner, mover el botón un poco más arriba */
    #cookie-banner:not([style*="display: none"]) ~ .theme-toggle {
        bottom: 80px;
    }
}

/* Prevenir problemas en iOS/Safari */
@supports (-webkit-touch-callout: none) {
    .theme-toggle {
        cursor: pointer;
    }
}

/* Para móvil */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

.cookie-content {
    max-width: 1200px;
    margin: auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 14px;
    color: #e5e7eb;
    margin: 0;
}

.cookie-content a {
    color: #38bdf8;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

#cookie-accept {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}

#cookie-reject {
    background: transparent;
    border: 1px solid #94a3b8;
    color: #e5e7eb;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: button;
}

#cookie-accept:hover,
#cookie-reject:hover {
    transform: translateY(-2px);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Corrección de emergencia para mostrar contenido */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Forzar visibilidad si JavaScript no funciona */
.no-js .fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Estilos para tema oscuro */
body.dark-theme {
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --gray-color: #94a3b8;
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-theme header {
    background-color: rgba(15, 23, 42, 0.95);
}

body.dark-theme .logo-text {
    color: #f8fafc;
}

body.dark-theme .nav-link {
    color: #004489;
}

body.dark-theme .nav-link:hover {
    color: var(--primary-color);
}

body.dark-theme .services {
    background-color: #1e293b;
}

body.dark-theme .service-card {
    background: #1e293b;
    color: #f8fafc;
}

body.dark-theme .service-description {
    color: #cbd5e1;
}

body.dark-theme .testimonial-card {
    background: #1e293b;
    color: #f8fafc;
}

body.dark-theme .author-info p {
    color: #cbd5e1;
}

body.dark-theme .faq-item {
    background: #1e293b;
    color: #f8fafc;
}

body.dark-theme .faq-question {
    color: #f8fafc;
}

body.dark-theme .contact-info h2,
body.dark-theme .contact-text h4,
body.dark-theme .hours-title {
    color: #f8fafc;
}

body.dark-theme .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

body.dark-theme .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .footer-links a {
    color: #94a3b8;
}

body.dark-theme .footer-links a:hover {
    color: var(--primary-color);
}