/**
 * home.css - Estilos específicos para la página de inicio
 * Basado en 1.2-Tabla-componentes-bootstrap-seccion-home.md y 1.3-tabla-seccion-efectos-home.md
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-home {
    position: relative;
    min-height: 90vh;
    background: #1a1a1a;
    overflow: hidden;
    z-index: 10;
}

.hero-carousel-item {
    min-height: 90vh;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.6s ease-in-out !important;
}

.hero-home .container {
    position: relative;
    z-index: 2;
}

.hero-home h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-home .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .hero-home {
        min-height: 70vh;
    }

    .hero-home h1 {
        font-size: 2.5rem;
    }

    .hero-home .lead {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Líneas de Productos
   ========================================================================== */
.productos-home {
    position: relative;
    z-index: 20;
    background-color: #ffffff;
}

.productos-home .card {
    height: 100%;
    position: relative;
    cursor: pointer;
}

.productos-home .card-img-top {
    height: 300px;
    object-fit: cover;
}

.productos-home .card-body {
    padding: 2rem;
}

.productos-home .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--donosti-dark);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Por qué elegir Donosti
   ========================================================================== */
.porque-elegir {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.porque-elegir .icon-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.porque-elegir .icon-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.porque-elegir .icon-box i {
    font-size: 3rem;
    color: var(--donosti-red);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.porque-elegir .icon-box:hover i {
    transform: scale(1.1);
}

.porque-elegir .icon-box h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.porque-elegir .icon-box p {
    color: var(--donosti-gray);
    margin-bottom: 0;
}

/* ==========================================================================
   Servicios Especializados
   ========================================================================== */
.servicios-home {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/bg-home-servicios.jpg') center center/cover no-repeat;
    background-attachment: fixed;
    color: white;
}

.servicios-home .section-title,
.servicios-home .section-subtitle {
    color: white;
}

.servicios-home .service-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.servicios-home .service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.servicios-home .service-card i {
    font-size: 2.5rem;
    color: var(--donosti-red);
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.servicios-home .service-card:hover i {
    transform: scale(1.03);
    color: #c82333;
}

.servicios-home .service-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.servicios-home .service-card p {
    font-size: 0.9rem;
    color: var(--donosti-gray);
    margin-bottom: 0;
}

/* ==========================================================================
   Banda CTA "Confía en Donosti"
   ========================================================================== */
.cta-band {
    background: linear-gradient(135deg, #DC3545 0%, #c82333 100%);
    background-attachment: fixed;
    background-size: cover;
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-band::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-band .container {
    position: relative;
    z-index: 2;
}

.cta-band h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-band p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-band .btn-light {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.cta-band .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.98px) {
    .cta-band {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .cta-band h2 {
        font-size: 2rem;
    }

    .cta-band p {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   Galería / Proyectos Recientes
   ========================================================================== */
.galeria-home .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    height: 300px;
}

.galeria-home .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

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

.galeria-home .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(220, 53, 69, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s ease;
}

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

.galeria-home .gallery-overlay h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.galeria-home .gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ==========================================================================
   CTA Final
   ========================================================================== */
.cta-final {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/bg-home-cta.jpg') center center/cover no-repeat;
    background-attachment: fixed;
    padding: 10rem 0;
    color: white;
}

.cta-final h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.cta-final p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Responsive Mobile Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .galeria-home .gallery-item {
        height: 250px;
        margin-bottom: 1rem;
    }
}