/* ============================================
   GRUPO UTP - Estilos Principales
   Paleta: Navy #1e3a8a | Royal #1d4ed8 | 
           Sky #3b82f6 | Gold #facc15 |
           Slate #1e293b | Light #f1f5f9
   ============================================ */

:root {
    --navy: #1e3a8a;
    --royal: #1d4ed8;
    --sky: #3b82f6;
    --gold: #facc15;
    --white: #ffffff;
    --slate: #1e293b;
    --light: #f1f5f9;
    --gray: #64748b;
    --whatsapp: #25d366;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
    --transition: .3s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--slate);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============ NAVBAR ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 800;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo-grupo {
    color: var(--navy);
    padding: 4px 8px;
    border: 3px solid var(--navy);
}

.logo-utp {
    color: var(--white);
    background: var(--navy);
    padding: 4px 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-weight: 500;
    font-size: .95rem;
    color: var(--slate);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--royal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--royal);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cdi {
    background: var(--gold);
    color: var(--navy) !important;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
}

.nav-cdi::after { display: none !important; }

.nav-cdi:hover {
    background: #eab308;
    color: var(--navy) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--slate);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}

.btn-primary:hover {
    background: #eab308;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(250,204,21,.35);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,.35);
}

.btn-sm {
    padding: 8px 20px;
    font-size: .875rem;
    background: var(--royal);
    color: var(--white);
    border-radius: 6px;
    margin-top: 12px;
}

.btn-sm:hover {
    background: var(--navy);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 72px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--royal) 50%, var(--sky) 100%);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(250,204,21,.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 80px 24px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: var(--gold);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.1);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.125rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============ SECTIONS COMMON ============ */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray);
}

/* ============ SERVICIOS ============ */
.servicios {
    padding: 100px 0;
    background: var(--light);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
}

.servicio-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.servicio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--royal);
}

.servicio-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--navy), var(--royal));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: 20px;
}

.servicio-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.servicio-card p {
    color: var(--gray);
    font-size: .95rem;
    line-height: 1.7;
}

.servicio-cdi {
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, #fffbeb, var(--white));
}

.servicio-cdi .servicio-icon {
    background: linear-gradient(135deg, #92400e, #d97706);
}

/* ============ NOSOTROS ============ */
.nosotros {
    padding: 100px 0;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.nosotros-content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 20px;
}

.nosotros-content p {
    color: var(--gray);
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.nosotros-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--royal);
}

.stat-label {
    font-size: .9rem;
    color: var(--gray);
    font-weight: 500;
}

.nosotros-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.visual-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--light);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--navy);
    transition: var(--transition);
    border-left: 4px solid var(--royal);
}

.visual-card:hover {
    background: var(--navy);
    color: var(--white);
}

.visual-card:hover .visual-icon {
    color: var(--gold);
}

.visual-icon {
    font-size: 1.5rem;
    color: var(--royal);
    transition: var(--transition);
    min-width: 32px;
    text-align: center;
}

/* ============ CLIENTES ============ */
.clientes {
    padding: 80px 0;
    background: var(--light);
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: center;
    justify-items: center;
}

.cliente-logo {
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    filter: grayscale(100%);
    opacity: .7;
}

.cliente-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.cliente-logo img {
    max-height: 60px;
    max-width: 160px;
    object-fit: contain;
}

.cliente-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--gray);
    font-size: 1.1rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 2px dashed #cbd5e1;
}

/* ============ TECNOLOGÍAS ============ */
.tecnologias {
    padding: 100px 0;
    background: var(--white);
}

.tech-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.tech-category {
    background: var(--light);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid rgba(0,0,0,.04);
    transition: var(--transition);
}

.tech-category:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--royal);
}

.tech-category h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
}

.tech-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-4px);
}

.tech-item img,
.tech-item .tech-svg {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.tech-item span {
    font-size: .75rem;
    color: var(--gray);
    font-weight: 500;
    text-align: center;
}

.tech-text-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .55rem;
    font-weight: 900;
    color: var(--navy);
    background: rgba(30,58,138,.08);
    border-radius: 8px;
    letter-spacing: -.5px;
    text-transform: uppercase;
    line-height: 1;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--slate);
    color: rgba(255,255,255,.8);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-logo .logo-grupo {
    background: var(--white);
}

.footer-brand p {
    font-size: .95rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer h4 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer p {
    font-size: .9rem;
    line-height: 1.8;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul a {
    font-size: .9rem;
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: .85rem;
    color: rgba(255,255,255,.5);
}

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.4);
    z-index: 999;
    transition: var(--transition);
    animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,.5);
}

@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,.6); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .tech-categories {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .nosotros-grid {
        gap: 32px;
    }

    .servicios-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1010;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 32px 24px;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform var(--transition), visibility 0s .3s;
        z-index: 999;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform var(--transition), visibility 0s;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 12px 0;
        display: block;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-cdi {
        text-align: center;
        margin-top: 8px;
        padding: 12px 16px;
        border-bottom: none;
        border-radius: 8px;
    }

    .hero {
        min-height: auto;
        padding-top: 72px;
    }

    .hero-content {
        padding: 48px 20px 60px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.15;
    }

    .hero-sub {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .hero-desc {
        font-size: .95rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .servicios {
        padding: 48px 0;
    }

    .servicios-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .servicio-card {
        padding: 20px 16px;
    }

    .servicio-icon {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .servicio-icon svg {
        width: 28px;
        height: 28px;
    }

    .servicio-card h3 {
        font-size: 1rem;
    }

    .servicio-card p {
        font-size: .85rem;
        line-height: 1.5;
    }

    .btn-sm {
        padding: 6px 14px;
        font-size: .8rem;
    }

    .nosotros {
        padding: 48px 0;
    }

    .nosotros-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .nosotros-content h2 {
        font-size: 1.75rem;
    }

    .nosotros-content p {
        font-size: .95rem;
    }

    .nosotros-stats {
        gap: 20px;
        margin-top: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .visual-card {
        padding: 16px 20px;
        font-size: .95rem;
    }

    .clientes {
        padding: 48px 0;
    }

    .clientes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cliente-logo {
        height: 80px;
        padding: 14px;
    }

    .cliente-logo img {
        max-height: 48px;
        max-width: 100px;
    }

    .tecnologias {
        padding: 48px 0;
    }

    .tech-categories {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tech-category {
        padding: 20px;
    }

    .tech-category h3 {
        font-size: .85rem;
        margin-bottom: 16px;
    }

    .tech-logos {
        gap: 16px;
        justify-content: flex-start;
    }

    .tech-item {
        min-width: 60px;
    }

    .tech-item img,
    .tech-item .tech-svg {
        width: 32px;
        height: 32px;
    }

    .tech-text-logo {
        width: 32px;
        height: 32px;
        font-size: .45rem;
    }

    .footer {
        padding: 48px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-header h2 {
        font-size: 1.65rem;
    }

    .section-header p {
        font-size: .95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-container {
        height: 60px;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-links {
        top: 60px;
    }

    .hero {
        padding-top: 60px;
    }

    .hero-content {
        padding: 36px 16px 48px;
    }

    .hero h1 {
        font-size: 1.65rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: .75rem;
        padding: 4px 12px;
    }

    .hero-desc {
        font-size: .9rem;
    }

    .section-header h2,
    .nosotros-content h2 {
        font-size: 1.4rem;
    }

    .section-header p {
        font-size: .85rem;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .servicio-card {
        padding: 20px 16px;
    }

    .nosotros-stats {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: .9rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}
