/* ===================================
   VIVENDI PUBLICIDAD - ESTILOS PERSONALIZADOS
   Diseño: App-like profesional
   =================================== */

/* Variables de Colores Corporativos */
:root {
    --vivendi-blue: #003366;
    --vivendi-orange: #FF6600;
    --vivendi-gray: #F3F4F6;
    --vivendi-dark: #1a1a1a;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #4a5568;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Scroll Suave con offset para navbar */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Altura del navbar + margen */
}

/* ===================================
   HERO SLIDER CON SWIPER.JS
   =================================== */

/* Contenedor del Slider */
.hero-swiper {
    width: 100%;
    height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.hero-swiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Imagen de fondo del slide */
.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 7s ease-out;
}

/* Efecto Ken Burns (zoom suave en imagen) */
.hero-swiper .swiper-slide-active img {
    transform: scale(1.1);
}

/* Overlay oscuro sobre las imágenes */
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 51, 102, 0.85) 0%,
        rgba(0, 51, 102, 0.65) 50%,
        rgba(255, 102, 0, 0.4) 100%
    );
    z-index: 1;
}

/* Alternativa: Overlay con gradiente de abajo hacia arriba */
.slide-overlay-bottom {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 51, 102, 0.7) 40%,
        rgba(0, 51, 102, 0.3) 70%,
        transparent 100%
    );
    z-index: 1;
}

/* Contenido del slide (textos y botones) */
.slide-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: white;
}

/* Animación de entrada para el contenido */
.slide-content.animate-fade-in {
    animation: slideContentFadeIn 0.8s ease-out;
}

@keyframes slideContentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge/Tag del slide */
.slide-badge {
    display: inline-block;
    background: var(--vivendi-orange);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

/* Título del slide */
.slide-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.6);
    max-width: 900px;
}

/* Subtítulo del slide */
.slide-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 700px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.95);
}

/* Botones del slide */
.slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.slide-btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slide-btn-primary {
    background: var(--vivendi-orange);
    color: white;
}

.slide-btn-primary:hover {
    background: #ff8533;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.slide-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.slide-btn-secondary:hover {
    background: white;
    color: var(--vivendi-blue);
    transform: translateY(-3px);
}

/* Personalización de controles de Swiper */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(0, 51, 102, 0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 1.25rem;
    font-weight: 900;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: var(--vivendi-orange);
    transform: scale(1.1);
}

/* Paginación (dots) */
.hero-swiper .swiper-pagination {
    bottom: 40px !important;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    width: 40px;
    border-radius: 6px;
    background: var(--vivendi-orange);
}

/* Scroll indicator (flecha hacia abajo) */
.scroll-indicator {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

/* Responsive - Móvil */
@media (max-width: 768px) {
    .hero-swiper {
        height: 100vh;
    }

    .slide-content {
        padding: 1.5rem 1rem;
    }

    .slide-badge {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
    }

    .slide-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .slide-btn {
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
    }

    .slide-buttons {
        flex-direction: column;
        width: 100%;
    }

    .slide-btn {
        width: 100%;
        justify-content: center;
    }

    /* Ocultar flechas en móvil */
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        display: none;
    }

    /* Ajustar paginación en móvil */
    .hero-swiper .swiper-pagination {
        bottom: 20px !important;
    }

    .hero-swiper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .hero-swiper .swiper-pagination-bullet-active {
        width: 24px;
    }
}

/* Animación bounce para scroll indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-12px);
    }
    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* ===================================
   PARALLAX SECTION
   =================================== */

.parallax-section {
    background-image: url('../img/slider/parallax2.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 300px;
}

/* En móvil desactivar parallax (mejor performance) */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        background-position: center center;
    }
}

/* Sombras de Texto */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-shadow-lg {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

/* Tarjetas de Servicios - Efecto Hover */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card:hover .icon-container {
    background-color: var(--vivendi-orange);
    color: white;
    transform: scale(1.1);
}

.icon-container {
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #25D366;
    color: white;
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
    text-decoration: none;
}

.whatsapp-float i {
    font-size: 2.2rem;
    line-height: 1;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    }
}

/* Navbar Sticky Effect */
.navbar-sticky {
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background: #003366 !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Navbar Links */
#navbar a {
    position: relative;
}

#navbar a:not(.bg-vivendi-orange)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6600;
    transition: width 0.3s ease;
}

#navbar a:not(.bg-vivendi-orange):hover::after {
    width: 100%;
}

/* Portafolio - Grid de imágenes */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Formulario - Estilos mejorados */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--vivendi-orange);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

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

.btn-submit {
    background: var(--vivendi-blue);
    color: white;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: #002244;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
}

.btn-submit.bg-green-600 {
    background: #25D366;
}

.btn-submit.bg-green-600:hover {
    background: #128C7E;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alertas de Formulario */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* Responsive - Ajustes móviles */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
        background-position: center;
    }

    .whatsapp-float {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float i {
        font-size: 1.8rem;
    }

    .portfolio-item {
        height: 250px;
    }
}

/* Loading Spinner (para envío de formulario) */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--vivendi-orange);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .whatsapp-float,
    nav,
    footer {
        display: none;
    }
}

/* ===================================
   GALERÍA MASONRY
   =================================== */

.gallery-masonry {
    column-count: 4;
    column-gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 102, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
    animation: zoomPulse 1s ease-in-out infinite;
}

@keyframes zoomPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive Gallery */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 12px;
    }

    .gallery-item {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        column-count: 1;
    }
}

/* ===================================
   LIGHTBOX
   =================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    line-height: 1;
    padding: 0 10px;
}

.lightbox-close:hover {
    color: var(--vivendi-orange);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 51, 102, 0.8);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--vivendi-orange);
    transform: scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: scale(0.95);
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-nav {
        padding: 0 10px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-counter {
        bottom: 20px;
        font-size: 0.85rem;
        padding: 6px 16px;
    }
}
