/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f0f0f;
    color: #dcdcdc;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== VARIABLES CSS ===== */
:root {
    --primary-red: #e63946;
    --accent-yellow: #f1c40f;
    --bg-black: #0f0f0f;
    --text-light: #dcdcdc;
    --text-white: #ffffff;
    --border-color: #333;
    --gradient-red: linear-gradient(135deg, #e63946, #c62828);
    --shadow-red: 0 8px 25px rgba(230, 57, 70, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-white);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-black);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-red);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-red);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(230, 57, 70, 0.4);
    background: linear-gradient(135deg, var(--accent-yellow), #e6c200);
}

.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(241, 196, 15, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(230, 57, 70, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

/* ===== COMPANIES SECTION ===== */
.companies {
    padding: 8rem 0;
    background: var(--bg-black);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-red);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

/* Optimización para 6 empresas - 3 columnas en pantallas grandes */
@media (min-width: 1200px) {
    .companies-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 2 columnas en tablets */
@media (min-width: 768px) and (max-width: 1199px) {
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.company-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.company-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(230, 57, 70, 0.2);
}

.image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.company-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1.1);
}

.company-card:hover .company-image {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.2);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
    color: var(--text-white);
}

.company-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-red);
}

.company-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

.card-content {
    padding: 1.5rem;
    text-align: center;
}

.visit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-red);
    color: var(--text-white);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.visit-button .icon-external {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.visit-button:hover .icon-external {
    transform: translateX(2px) translateY(-2px);
}

.visit-button:hover {
    background: linear-gradient(135deg, var(--accent-yellow), #e6c200);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.3);
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 8rem 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a0f0f 50%, #0f0f0f 100%);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

.about-text .section-title::after {
    left: 0;
    transform: none;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.about-visual {
    position: relative;
    height: 400px;
}

.animated-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, var(--primary-red) 49%, var(--primary-red) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, var(--accent-yellow) 49%, var(--accent-yellow) 51%, transparent 52%);
    background-size: 30px 30px;
    opacity: 0.1;
    animation: moveLines 8s linear infinite;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 8rem 0;
    background: var(--bg-black);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-info .section-title::after {
    left: 0;
    transform: none;
}

.contact-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.contact-item:hover {
    border-color: var(--primary-red);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-red);
    width: 30px;
    text-align: center;
}

.contact-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #1a1a1a;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-red);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-red);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    background: #1a1a1a;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-white);
    font-size: 1rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-red);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--primary-red);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    width: 100%;
    background: var(--gradient-red);
    color: var(--text-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-red);
}

.submit-button:hover {
    background: linear-gradient(135deg, var(--accent-yellow), #e6c200);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(241, 196, 15, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: #0a0a0a;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-logo .logo-text {
    font-size: 1.5rem;
}

.footer-text p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(2deg);
    }
    66% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

@keyframes moveLines {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 30px 30px, -30px 30px;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .stats {
        justify-content: center;
    }
    
    .companies-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .about-visual {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .video-container {
        height: 200px;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .company-description {
        font-size: 0.8rem;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-yellow);
}