/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Copyright (C) 2026 Francisco Molina-Burgos, Avermex Research Division */

/* ============================================
   COLOR PALETTE & VARIABLES
   ============================================ */
:root {
    --primary: #003d82;
    --primary-dark: #002851;
    --primary-light: #0052a8;
    --secondary: #00a86b;
    --secondary-dark: #007d50;
    --accent: #ff6b35;
    --accent-dark: #e65528;
    --dark: #1a1a2e;
    --dark-gray: #2d2d44;
    --light: #f8f9fa;
    --light-gray: #e9ecef;
    --white: #ffffff;

    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);

    --transition: all 0.3s ease;
}

/* ============================================
   RESET & GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background-color: var(--dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--light-gray);
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--light);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--white);
    border-bottom-color: var(--secondary);
}

.nav-external {
    background-color: var(--primary);
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    border: none !important;
}

.nav-external:hover {
    background-color: var(--primary-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 8rem 0 6rem;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-tagline {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.credentials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   SERVICES OVERVIEW
   ============================================ */
.services-overview {
    background-color: var(--light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.service-list {
    margin-bottom: 1.5rem;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dark-gray);
}

.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: 700;
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    color: var(--primary-light);
    gap: 0.75rem;
}

/* ============================================
   EXPERTISE SECTION
   ============================================ */
.expertise {
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.expertise-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.expertise-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.expertise-card h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.expertise-card p {
    color: var(--dark-gray);
    line-height: 1.7;
}

.link-external {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.link-external:hover {
    color: var(--primary-light);
}

/* ============================================
   WHY CHOOSE US
   ============================================ */
.why-choose {
    background-color: var(--white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.benefit-item {
    text-align: center;
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.benefit-item h3 {
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.benefit-item p {
    color: var(--dark-gray);
}

/* ============================================
   RESEARCH LINK SECTION
   ============================================ */
.research-link {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 4rem 0;
}

.research-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.research-icon {
    font-size: 5rem;
    opacity: 0.8;
}

.research-text h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.research-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--dark);
    color: var(--light-gray);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--light-gray);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-col i {
    margin-right: 0.5rem;
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.license-info {
    font-size: 0.85rem;
    opacity: 0.8;
}

.license-info a {
    color: var(--secondary);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: var(--dark);
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .credentials {
        flex-direction: column;
        align-items: center;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .research-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .service-grid,
    .expertise-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
