/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

section {
    padding: 5rem 0;
    position: relative;
}

/* 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: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.text-accent {
    color: var(--text-accent);
}

.text-center {
    text-align: center;
}

/* Header */
.header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    /* Ensure vertical center */
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    /* JS toggled later for mobile */
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 60%);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

/* Background Patterns */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)),
        url('https://www.transparenttextures.com/patterns/circuit-board.png');
    /* Tech feel */
    opacity: 0.1;
    z-index: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.floating-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero h1 span {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Shared Section Styles */
.section-bg-alt {
    background-color: var(--bg-secondary);
}

/* About / Quiénes Somos */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Services / Desarrollo & Tecnología */
/* Services / Desarrollo & Tecnología */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Centering */
    gap: 2rem;
}

.service-card {
    background: rgba(30, 41, 59, 0.5);
    /* Glass effect */
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-medium);
    flex: 1 1 300px;
    /* Responsive sizing */
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: rgba(14, 165, 233, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Approach / Enfoque */
.approach-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.approach-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.check-icon {
    color: var(--primary);
}

/* Clients */
.clients-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    opacity: 0.7;
}

.client-item {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Footer / Contact */
.footer {
    background: #020617;
    padding: 4rem 0 2rem;
    text-align: center;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 1.5rem;
    max-width: 600px;
    margin: 0 auto -8rem;
    /* Overlap effect if placed before footer */
    position: relative;
    top: -8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.footer-bottom {
    margin-top: 8rem;
    /* compensate for negative margin */
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #64748b;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-container {
        flex-direction: column;
        /* Text first (default), Image second - fixed mobile order */
        text-align: center;
        gap: 3rem;
        padding-bottom: 2rem;
    }

    .hero-content {
        text-align: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}