@import url('fonts.css');

:root {
    --color-primary: #F3C300; /* Yellow */
    --color-dark: #121416;
    --color-gray-dark: #1E2022;
    --color-gray-light: #F4F5F7;
    --color-white: #FFFFFF;
    --color-text: #6B7280;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-gray-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    font-weight: 700;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: 100px 0;
}

.btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: var(--color-primary);
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(243, 195, 0, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(18, 20, 22, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle .bar {
    width: 30px;
    height: 3px;
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

/* Hero Section with ThreeJS */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-dark);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18,20,22,1) 0%, rgba(18,20,22,0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(243, 195, 0, 0.1);
    border-left: 4px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.hero h1 {
    color: var(--color-white);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 900;
}

.hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 600px;
}

/* About Section */
.about {
    background: var(--color-white);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: var(--color-primary);
    z-index: -1;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 900;
}

.section-title p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Sectores Especializados (Bento Layout) */
.sectores {
    background: var(--color-gray-dark);
    color: var(--color-white);
}

.sectores .section-title h2 {
    color: var(--color-white);
}

.sectores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.sector-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.sector-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    z-index: 1;
}

.sector-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18,20,22,0.9) 0%, rgba(18,20,22,0.1) 100%);
    z-index: 2;
    transition: var(--transition);
}

.sector-card:hover img {
    transform: scale(1.1);
}

.sector-card:hover::before {
    background: linear-gradient(to top, rgba(243, 195, 0, 0.95) 0%, rgba(18,20,22,0.1) 100%);
}

.sector-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.sector-card h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.sector-card p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.sector-card:hover p {
    color: var(--color-dark);
    opacity: 1;
    transform: translateY(0);
}

.sector-card:hover h3 {
    color: var(--color-dark);
}

/* Servicios Layout */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.servicio-box {
    position: relative;
    background: var(--color-gray-dark);
    padding: 30px 20px;
    border-radius: 4px;
    border-left: 3px solid transparent;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    z-index: 1;
}

.servicio-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    transition: var(--transition);
    z-index: -1;
    filter: grayscale(100%);
}

.servicio-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18,20,22,1) 0%, rgba(18,20,22,0.2) 100%);
    z-index: -1;
    transition: var(--transition);
}

.servicio-box:hover {
    border-left-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.servicio-box:hover img {
    opacity: 0.4;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.servicio-overlay {
    position: relative;
    z-index: 2;
    text-align: left;
    background: transparent;
    padding: 0;
}

.servicio-overlay h4 {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    transition: var(--transition);
}

.servicio-box:hover .servicio-overlay h4 {
    color: var(--color-primary);
}

/* Stats */
.stats {
    background: var(--color-primary);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item h4 {
    font-size: 3.5rem;
    color: var(--color-dark);
    margin-bottom: 5px;
    font-weight: 900;
}

.stat-item p {
    color: rgba(18,20,22,0.8);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.6);
    padding: 80px 0 30px;
    border-top: 5px solid var(--color-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 25px;
}

.footer-col h4 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

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

.footer-col ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.footer-icon {
    color: var(--color-primary);
    margin-top: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(18, 20, 22, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .hero h1 { font-size: 3rem; }
    .about-grid { grid-template-columns: 1fr; }
    .sectores-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .servicios-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .servicios-grid { grid-template-columns: 1fr; }
}
