/* =========================================
   1. RESET Y CONFIGURACIÓN GLOBAL
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: #0d0d0d;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 90px;
}

.section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #00c3ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =========================================
   2. NAVBAR (STICKY)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #00c3ff;
    font-weight: 700;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    font-weight: 500;
}

.nav-menu a:hover { color: #00c3ff; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-video {
    position: relative;
    height: calc(100vh - 90px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-video {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}

.btn {
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    background-color: #E53935;
    padding: 14px 30px;
    border-radius: 8px;
    transition: 0.3s;
    display: inline-block;
    margin-top: 20px;
    border: none;
    cursor: pointer;
}

.btn:hover { 
    background-color: #b71c1c; 
    transform: scale(1.05); 
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
}

/* =========================================
   4. LOGOS PARTNERS (DJI / COVERDRONE)
   ========================================= */
.contenedor-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 40px 20px;
    flex-wrap: wrap;
}

.logos {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.6;
    transition: 0.4s ease;
}

.logos:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

/* =========================================
   5. SERVICIOS (3 TARJETAS)
   ========================================= */
   
   .logo, .logo2 {
    width: 140px;          /* Tamaño contenido y profesional */
    height: auto;
    object-fit: contain;
    transition: 0.3s ease;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: 0.3s ease;
}

.service-card:hover {
    background: rgba(0, 195, 255, 0.05);
    border-color: #00c3ff;
    transform: translateY(-10px);
}

/* =========================================
   6. SECCIÓN IA — VÍDEOS VERTICALES
   ========================================= */
.video-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.video-slide video {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(0, 195, 255, 0.3);
    display: block;
    margin: 0 auto;
}

/* =========================================
   7. EQUIPO — CARRUSEL HORIZONTAL
   ========================================= */
.equipo-section {
    background: #0a0a0a;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding: 20px;
    width: max-content;
}

.carousel-item {
    flex: 0 0 280px;
    height: 400px;
    background: #111;
    border-radius: 15px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.caption { padding: 15px; font-weight: 600; text-align: center; }
/* =========================================
   8. PORTFOLIO — VÍDEOS EQUILIBRADOS
   ========================================= */
#portfolio {
    display: grid;
    /* Forza 3 columnas en escritorio */
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px;
    padding: 40px 0;
}

.portfolio-item {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 195, 255, 0.2);
}

.portfolio-item video, 
.video-wrapper iframe {
    width: 100%;
    /* Mantiene la proporción 16:9 sin importar el monitor */
    aspect-ratio: 16 / 9; 
    object-fit: cover;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* =========================================
   9. SOBRE MÍ
   ========================================= */
.sobre-mi-contenido {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.foto-perfil {
    width: 180px;
    height: 180px;
    min-width: 180px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid #00c3ff;
}

/* =========================================
   9. CONTACTO
   ========================================= */
.airfx-form {
    max-width: 500px;
    margin: 40px auto;
    padding: 35px;
    background: #111;
    border-radius: 15px;
    border: 1px solid rgba(0, 195, 255, 0.2);
}

.airfx-form input, .airfx-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
}

.btn-enviar {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #00c3ff, #0077ff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* =========================================
   10. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 40px 20px;
    background: #080808;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.instagram-icon {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: 0.3s;
}

.instagram-icon:hover { opacity: 1; transform: scale(1.1); }

/* =========================================
   11. RESPONSIVE
   ========================================= */
   @media (max-width: 1024px) {
    #portfolio {
        /* 2 vídeos en tablets */
        grid-template-columns: repeat(2, 1fr); 
    }
}
   
@media (max-width: 768px) {
    h2 { font-size: 1.8rem; }
    
    /* Servicios a 1 columna */
    .services-grid { grid-template-columns: 1fr; }

    /* Sobre mí vertical */
    .sobre-mi-contenido {
        flex-direction: column;
        text-align: center;
    }

    /* Carrusel de equipo ajustable */
    .carousel-item {
        flex: 0 0 calc(50vw - 30px);
        height: auto;
    }
    .logo, .logo2 {
        width: 100px;      /* Un poco más pequeños en el móvil */
    }
    .carousel-item img { height: 180px; }

    /* Logos Partners más pequeños */
    .logos { height: 30px; }
    
    #portfolio {
        /* 1 vídeo en móvil para que se vea bien el detalle */
        grid-template-columns: 1fr; 
        gap: 20px;
    }
}