/* Variables de Color (Branding) */
:root {
    --pixan-orange: #EF7D30;
    --pixan-dark: #1D1D1B;
    --pixan-blue: #0B1B32;
    --pixan-blue-light: #e6ecf5;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--pixan-dark);
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 { font-weight: 700; }
.text-orange { color: var(--pixan-orange) !important; }
.bg-orange { background-color: var(--pixan-orange); }
.bg-blue { background-color: var(--pixan-blue); }
.bg-blue-light { background-color: var(--pixan-blue-light); }

/* Botones Personalizados */
.btn-pixan {
    background-color: var(--pixan-orange);
    color: white;
    border: 2px solid var(--pixan-orange);
    border-radius: 50px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.btn-pixan:hover {
    background-color: transparent;
    color: var(--pixan-orange);
    box-shadow: 0 5px 15px rgba(239, 125, 48, 0.3);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
.nav-link { 
    font-weight: 500; 
    color: var(--pixan-dark);
    transition: color 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--pixan-orange) !important; }

/* Hero Section */
#home {
    background: linear-gradient(135deg, var(--pixan-blue) 0%, #152b4a 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content { position: relative; z-index: 1; color: white; }

/* AdSense Containers */
.ad-container {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}
.ad-responsive { height: 250px; }

/* Cards Servicios */
.service-card {
    border: none;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* Video Responsive */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background-color: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* Floating WhatsApp */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.float-wa:hover { 
    background-color: #128C7E; 
    transform: scale(1.1) rotate(15deg); 
}

/* Footer Link Hover */
.hover-orange:hover { color: var(--pixan-orange) !important; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    #home { text-align: center; }
    .display-3 { font-size: 2.5rem; }
}

/* --- Carousel / Hero Styles --- */

/* Altura del carrusel: 100vh ocupa toda la pantalla, 85vh deja ver un poco de la siguiente sección */
#home, .carousel-item {
    height: 90vh; 
    position: relative;
    background-color: var(--pixan-dark); /* Color de fondo por si la imagen tarda en cargar */
}

/* Ajuste de imágenes para que cubran todo sin deformarse */
.object-fit-cover {
    object-fit: cover;
    object-position: center;
}

/* Overlay Oscuro: Vital para que el texto blanco se lea sobre cualquier imagen */
.carousel-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(11, 27, 50, 0.7), rgba(29, 29, 27, 0.8)); /* Azul Pixan a Negro con transparencia */
    z-index: 1;
}

/* Posicionar el texto encima del overlay */
.carousel-caption {
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 3rem;
}

/* Animaciones de entrada para el texto (Efecto Profesional) */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes Móviles */
@media (max-width: 768px) {
    #home, .carousel-item { height: 100vh; /* En móvil pantalla completa */ }
    .display-3 { font-size: 2.5rem; } /* Texto más pequeño en celular */
}

/* Control del Logo en Navbar */
.navbar-brand img {
    height: 45px; /* Altura visual en pantalla estándar */
    width: auto;  /* El ancho se ajusta solo */
    transition: all 0.3s ease;
}

/* Ajuste para móviles si quieres que sea un poco más pequeño */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
    }
}

.link-limpio {
    text-decoration: none; /* Quita el subrayado */
    color: inherit;         /* Hereda el color del texto del padre (negro, gris, etc.) */
    cursor: pointer;        /* Mantiene la manita para que el usuario sepa que es clickable */
}

/* Opcional: Efecto sutil al pasar el mouse para UX */
.link-limpio:hover {
    opacity: 0.8;
}

/* --- Corrección del Portafolio --- */

/* 1. Quitar altura forzada al contenedor del slider del portafolio */
#portafolio .carousel-inner,
#portafolio .carousel-item {
    height: auto !important; /* Deja que el contenido defina la altura */
    min-height: auto !important;
}

/* 2. Asegurar que las tarjetas tengan una altura consistente (ya lo tenías, pero lo reforzamos) */
#portafolio .card {
    height: 100%; /* Ocupa todo el alto de la columna */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Sombra suave */
    border: none; /* Sin bordes feos */
    transition: transform 0.3s ease;
}

#portafolio .card:hover {
    transform: translateY(-5px); /* Efecto de elevación al pasar el mouse */
}

/* 3. Ajuste para que las imágenes se vean COMPLETAS */
#portafolio .card-img-top {
    width: 100%; /* Que ocupe todo el ancho de la tarjeta */
    height: auto; /* ¡Importante! Deja que la altura se ajuste sola según la imagen */
    object-fit: unset; /* Quitamos el recorte */
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

/* Quitamos también el ajuste móvil ya que 'height: auto' funciona para todo */
@media (max-width: 768px) {
    #portafolio .card-img-top {
        height: auto;
    }
}

/* --- CORRECCIÓN MÓVIL HERO SLIDER --- */

/* 1. Obligar a la imagen a ser un fondo total */
#home .carousel-item img {
    position: absolute; /* La clave: lo sacamos del flujo normal */
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important; /* Forzamos la altura */
    object-fit: cover; /* Recorta lo que sobre, no deforma */
    z-index: 0; /* Al fondo */
}

/* 2. Ajustar el tamaño del texto en Celulares */
@media (max-width: 768px) {
    /* Hacemos el slider un poco más chico en móvil para que se vea el contenido de abajo */
    #home, .carousel-item {
        height: 85vh; 
        min-height: 500px; /* Evita que se aplaste demasiado en pantallas horizontales */
    }

    /* Reducimos los títulos gigantes */
    #home .display-3 {
        font-size: 2rem; /* Mucho más legible en móvil */
        line-height: 1.2;
    }

    #home .lead {
        font-size: 1rem;
    }
    
    /* Ajustamos el botón */
    #home .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}