/* Conecta Madrid - Soluciones Integrales de Conectividad */
:root {
    /* Color Palette - Red/Coral & Purple */
    --primary-color: #e53e3e;          /* Rojo vibrante */
    --secondary-color: #805ad5;        /* Púrpura */
    --accent-color: #fc8181;           /* Coral claro */
    --success-color: #38a169;          /* Verde para éxito */
    --warning-color: #f56500;          /* Naranja para warnings */
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #e53e3e 0%, #fc8181 50%, #805ad5 100%);
    --gradient-card: linear-gradient(145deg, rgba(229, 62, 62, 0.05), rgba(128, 90, 213, 0.05));
    --gradient-button: linear-gradient(135deg, #e53e3e, #c53030);
    --gradient-secondary: linear-gradient(135deg, #805ad5, #6b46c1);
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-full: 9999px;
    
    /* Shadows */
    --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);
    --shadow-button: 0 4px 14px 0 rgba(229, 62, 62, 0.4);
    --shadow-button-hover: 0 6px 20px 0 rgba(229, 62, 62, 0.5);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Section */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-gray {
    background-color: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
    gap: var(--spacing-md);
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.cookie-buttons button {
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookie-buttons .btn-primary {
    background: var(--gradient-button);
    color: var(--white);
}

.cookie-buttons .btn-secondary {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo {
    height: 50px;
    width: auto;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(229, 62, 62, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--gray-700);
    margin: 2px 0;
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-full);
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: calc(80px + var(--spacing-3xl)) 0 var(--spacing-3xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-lg);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual {
    width: 100%;
    max-width: 400px;
}

.connectivity-illustration {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.2));
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(255, 255, 255, 0.3);
}

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

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

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-100);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
}

.service-description {
    color: var(--gray-600);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

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

.service-features li {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--gray-600);
}

.service-features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: var(--font-weight-bold);
    margin-right: var(--spacing-xs);
    font-size: 1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-align: center;
    border: 1px solid var(--gray-100);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: var(--white);
}

.project-icon svg {
    width: 30px;
    height: 30px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.project-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Advantages Grid */
.advantages-grid {
    display: grid;
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.advantage-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.advantage-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.advantage-icon svg {
    width: 24px;
    height: 24px;
}

.advantage-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.advantage-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Crossover Section */
.crossover-section {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.05), rgba(128, 90, 213, 0.05));
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-xl) 0;
}

.crossover-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.crossover-text h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.crossover-text p {
    color: var(--gray-600);
    line-height: 1.6;
}

.crossover-action {
    flex-shrink: 0;
}

/* Contact Section */
.contact-section {
    background: var(--gray-50);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.contact-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-content h4 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.contact-content a,
.contact-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

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

/* Contact Form */
.contact-form-container {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Privacy Policy Checkbox */
.privacy-checkbox {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.privacy-checkbox:hover {
    background-color: #f1f5f9;
    border-color: var(--primary-color);
}

.privacy-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

.privacy-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.privacy-checkbox .checkbox-text {
    flex: 1;
}

.privacy-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.privacy-checkbox a:hover {
    border-bottom-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .privacy-checkbox {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .privacy-checkbox label {
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .privacy-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

.btn-submit {
    width: 100%;
    position: relative;
}

.btn-loading {
    display: none;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand .footer-logo {
    height: 40px;
    margin-bottom: var(--spacing-md);
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.footer-column h4 {
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-700);
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Layout */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: space-around;
        flex-wrap: wrap;
    }
    
    .crossover-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Spacing */
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .hero {
        padding: calc(80px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    }
    
    /* Cards */
    .service-card,
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    .hero-buttons {
        width: 100%;
    }
    
    .btn-primary,
    .btn-secondary {
        flex: 1;
        text-align: center;
    }
}

/* Fix for h1 inside semantic elements - MDN compliance */
h1 {
    font-size: 2.5rem;
}

section h1, article h1, aside h1, nav h1 {
    font-size: 2rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    section h1, article h1, aside h1, nav h1 {
        font-size: 1.75rem;
    }
}