/* ===========================
   Global Variables
   =========================== */
:root {
    /* Brand Colors */
    --primary: #86ECDE;          /* Light Blue from Logo */
    --primary-dark: #53BEE0;     /* Darker Blue for contrast */
    --secondary: #000000;        /* Text */
    --accent: #827CF6;
    --accent-light: #A2B7F6;
    --white: #ffffff;
    --light-gray: #f8f9fa;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Typography */
    --font-main: "Quicksand", sans-serif;

    /* Layout */
    --section-padding: 80px 20px;
    --container-width: 1200px;
    --header-height: 110px;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;

    /* Fondo con gradiente animado */
    background: linear-gradient(-45deg, #f8f9fa, #eef2f3, #e0eafc, #f8f9fa);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

main {
    padding-top: var(--header-height);
}

/* Container Utility */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   Typography
   =========================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.lead,
.hero p {
    font-weight: 300;
}

/* Logo */
.logo h2 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-img {
    height: calc(var(--header-height) - 30px);
    width: auto;
    display: block;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.cr-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.cr-brand__subtitle {
    font-size: 0.95rem;
    font-weight: 300;
    margin-top: 4px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(130, 124, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(130, 124, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* Quitar subrayado animado del botón de menú */
.nav-links .btn::after {
    display: none !important;
}

.nav-links .btn:hover {
    color: var(--white) !important;
    transform: translateY(-3px);
}

/* ===========================
   Glassmorphism Card
   =========================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes gradientBG {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* Float title */
.hero-content h1 {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Scroll reveal */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Header & Navigation
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Botón menú móvil */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===========================
   Hero
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e0f7fa 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(
            circle at 10% 20%,
            rgba(134, 236, 222, 0.4) 0%,
            transparent 40%
    ),
    radial-gradient(
            circle at 90% 80%,
            rgba(162, 183, 246, 0.2) 0%,
            transparent 40%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
}

/* ===========================
   Sections (general)
   =========================== */
.section {
    padding: var(--section-padding);
}

/* ===========================
   About
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

.philosophy-list {
    margin-top: 2rem;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.philosophy-list h4 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.philosophy-list ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.philosophy-list ul li i {
    color: var(--accent);
}

.image-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #eef2f3 0%, #8e9eab 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("/assets/office.png") center/cover no-repeat;
    opacity: 0.8;
    mix-blend-mode: overlay;
}

/* ===========================
   Services
   =========================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 5px 15px rgba(146, 199, 239, 0.5);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ===========================
   Experience
   =========================== */
.experience-header {
    text-align: center;
    margin-bottom: 3rem;
}

.experience-header p {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 4rem;
}

.stat-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--accent);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
}

/* ===========================
   Clients
   =========================== */
.clients-section {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* versión final: grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: 100%;
}

.client-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.client-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

.client-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    opacity: 0.7;
}

.client-card:hover .client-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-card h4 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 600;
}

/* ===========================
   Team
   =========================== */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.team-leader {
    text-align: center;
    padding: 40px;
    background: white;
}

.leader-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--primary);
}

.team-leader h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.team-leader .role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
}

.team-stats h3 {
    text-align: left;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.team-list {
    margin-top: 2rem;
}

.team-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.team-list .count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 60px;
    text-align: center;
}

.team-list .label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
}

/* ===========================
   Contact
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
}

.contact-info h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    color: #555;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(146, 199, 239, 0.2);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.info-item h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    margin-bottom: 0;
    font-size: 1rem;
}

.contact-form {
    padding: 40px;
    background: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===========================
   Footer
   =========================== */
footer {
    background: var(--secondary);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    opacity: 0.8;
}

/* ===========================
   Visual Enhancements
   =========================== */
.service-card,
.team-leader,
.client-item,
.stat-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover,
.team-leader:hover,
.stat-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Responsive
   =========================== */

/* 968px */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .image-placeholder {
        height: 300px;
        margin-top: 30px;
    }
}

/* 768px */
@media (max-width: 768px) {
    /* Menú móvil */
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 20px;
        top: 25px;
        z-index: 1001;
        font-size: 1.8rem;
        color: var(--secondary);
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
        padding-top: 80px; /* espacio para header */
    }

    .nav-links.active {
        transform: translateY(0);
    }

    /* Contacto */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px 20px;
    }

    /* Team list */
    .team-list li {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .team-list .count {
        font-size: 2.5rem;
    }

    /* Secciones y títulos */
    .section {
        padding: 40px 20px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .hero-content {
        padding: 0 10px;
    }

    /* Hero título */
    .hero h1 {
        font-size: 2.2rem;
        word-wrap: break-word;
    }

    /* Team grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .team-leader {
        padding: 20px;
        width: 100%;
    }

    .leader-image {
        width: 100px;
        height: 100px;
    }

    /* Container y body para evitar scroll horizontal */
    .container {
        padding: 0 15px;
        width: 100%;
    }

    body {
        overflow-x: hidden;
        width: 100%;
    }
}
