/* ===================================
   RESET Y VARIABLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #00d4ff;
    --text-dark: #1a1a1a;
    --text-light: #f8f9fa;
    --overlay-dark: rgba(0, 0, 0, 0.5);
}

html {
    background-color: #000000;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
    background-color: #000000;
}

/* ===================================
   HEADER
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: transparent;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -1px;
    z-index: 1001;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   HERO FULLSCREEN
   =================================== */
.hero-fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Video Players */
.video-player {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.video-player.active {
    opacity: 1;
    z-index: 2;
}

/* Ocultar gradient cuando hay video activo */
.video-background.has-video .animated-gradient {
    opacity: 0;
}

/* Animated Gradient (alternativa al video) */
.animated-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #667eea 100%
    );
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: 2;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    padding: 0 3rem;
    text-align: center;
    color: var(--text-light);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    animation: fadeInUp 1s ease-out;
}

.hero-text {
    font-size: 1.4rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--text-dark);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(10px);
    }
    60% {
        transform: translateX(-50%) translateY(5px);
    }
}

/* ===================================
   SECTIONS
   =================================== */
.section {
    padding: 6rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #000000;
    color: #ffffff;
}

.section:nth-child(even) {
    background: #000000;
}

.section-white {
    background: #000000 !important;
}

.section-grey {
    background: #000000 !important;
}

.section-fullwidth {
    padding: 6rem 0 0 0;
    background: #000000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    width: 100%;
}

.container-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.container-fullwidth .section-title,
.container-fullwidth .section-subtitle {
    padding: 0 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.3rem;
    color: #cccccc;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* ===================================
   SERVICES GRID (Qué Hacemos)
   =================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 4rem;
    width: 100%;
}

.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    height: 600px;
}

.service-image {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.4s ease;
}

.service-card:hover .service-overlay {
    background: rgba(102, 126, 234, 0.95);
}

.service-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: white;
}

.service-icon {
    margin-bottom: 2rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-icon {
    opacity: 0;
}

.service-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    transition: margin-bottom 0.3s ease;
}

.service-card:hover .service-title {
    margin-bottom: 1.5rem;
}

.service-description {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    margin-bottom: 1.5rem;
}

.service-card:hover .service-description {
    opacity: 1;
    max-height: 300px;
}

.service-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
    border-bottom: 2px solid transparent;
}

.service-card:hover .service-link {
    opacity: 1;
    transform: translateY(0);
    border-bottom-color: white;
}

.service-link:hover {
    padding-left: 5px;
}

/* ===================================
   PROJECTS GRID (Qué Estamos Haciendo)
   =================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.project-card {
    background: #1a1a1a;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid #2a2a2a;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
    background: #1a1a1a;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-description {
    font-size: 1rem;
    color: #cccccc;
    line-height: 1.7;
    margin: 0;
}

/* ===================================
   CONTACT SECTION (Contáctanos)
   =================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info p {
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.contact-image {
    margin: 1.5rem 0;
}

.contact-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.contact-details li {
    font-size: 1rem;
    color: #cccccc;
    line-height: 1.8;
    padding: 0.3rem 0;
}

.contact-form-wrapper {
    background: #1a1a1a;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border: 1px solid #2a2a2a;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #0a0a0a;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #cccccc;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    cursor: pointer;
    line-height: 1.6;
    color: #cccccc;
}

.form-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-checkbox a:hover {
    opacity: 0.8;
}

.btn-form {
    align-self: flex-start;
    min-width: 150px;
}

.btn-form:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-text {
        font-size: 1.2rem;
    }
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-container {
        padding: 0 1.5rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.5rem 0;
    }

    /* Hero Mobile */
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        letter-spacing: -1px;
    }

    .hero-text {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }

    .scroll-indicator {
        bottom: 2rem;
        font-size: 0.8rem;
    }

    /* Sections Mobile */
    .section {
        padding: 4rem 0;
        min-height: auto;
    }

    .section-fullwidth {
        padding: 4rem 0 0 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .container-fullwidth .section-title,
    .container-fullwidth .section-subtitle {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    /* Services Grid Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }

    .service-card {
        height: 500px;
    }

    .service-content {
        padding: 2rem;
    }

    .service-title {
        font-size: 1.5rem;
    }

    .service-description {
        font-size: 1rem;
    }

    /* Mostrar descripción en móvil sin hover */
    .service-description {
        opacity: 1;
        max-height: none;
    }

    .service-icon {
        margin-bottom: 1rem;
    }

    /* Projects Grid Mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .project-image {
        height: 220px;
    }

    .project-info {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    /* Contact Section Mobile */
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-info p {
        font-size: 1rem;
    }

    .btn-form {
        width: 100%;
        text-align: center;
    }
}

/* ===================================
   RESPONSIVE - SMALL MOBILE
   =================================== */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 1.5rem;
        letter-spacing: -0.5px;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .service-card {
        height: 450px;
    }

    .service-content {
        padding: 1.5rem;
    }

    .service-title {
        font-size: 1.3rem;
    }

    .service-description {
        font-size: 0.95rem;
    }

    .project-image {
        height: 200px;
    }
}
.hero-text a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.hero-text a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}