/**
 * ==============================================================================
 * SECCIÓN: MATERIALES DE CANTERA - ALQUILER Y EXCAVACIONES M&E
 * Concepto Visual: Editorial Industrial / Tarjetas con Inmersión de Imagen
 * ==============================================================================
 */

/**
 * ==============================================================================
 * HERO DE LA SUBPÁGINA - MATERIALES DE CANTERA (OPTIMIZADO EN DESKTOP)
 * ==============================================================================
 */

.materials-hero {
    position: relative;
    background-color: var(--navy-dark, #051329);
    padding: 140px 0 120px 0; /* Mayor espacio vertical para darle presencia */
    min-height: 75vh; /* Garantiza una proporción visual imponente en monitores grandes */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light, #ffffff);
    text-align: center;
    overflow: hidden;
}

/* Contenedor de la imagen de fondo con ajuste preciso de encuadre */
.materials-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.materials-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%; /* Centra el punto focal de la fotografía de cantera */
}

/* Asegura que el contenido quede centrado por encima de la imagen */
.materials-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.materials-hero .gold-line {
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-yellow, #f5b000);
    margin: 0 auto 15px auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.materials-hero .modal-tag {
    color: var(--primary-yellow, #f5b000);
    font-weight: 800;
    letter-spacing: 1.8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.9);
}

.materials-hero .premium-title {
    font-size: 2.8rem;
    margin: 12px 0 18px 0;
    font-weight: 900;
    line-height: 1.15;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.materials-hero .section-desc {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-light, #ffffff);
    font-size: 1.05rem;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Adaptación fluida para pantallas móviles */
@media (max-width: 768px) {
    .materials-hero {
        padding: 80px 0;
        min-height: auto; /* Restablece altura en móvil para no forzar espacio innecesario */
    }
    
    .materials-hero .premium-title {
        font-size: 1.9rem;
    }
}

/* Sección Contenedora del Catálogo */
.categories.section-light {
    background-color: var(--bg-light, #f4f7f9);
    padding: 60px 0 90px 0;
    overflow: hidden; 
}

/* Encabezado de Sección - Estilo Editorial (Izquierda / Derecha)[cite: 1] */
.categories-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1240px;
    margin: 0 auto 50px auto;
    padding: 0 15px;
    gap: 30px;
    text-align: left;
}

.intro-left {
    flex: 1;
}

.intro-right {
    max-width: 320px;
}

.cantera-gold-line {
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--primary-yellow, #f5b000);
    margin-bottom: 12px;
    border-radius: 2px;
}

.categories-intro .premium-title {
    color: var(--navy-blue, #091d3e);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0;
    text-transform: none;
}

.categories-intro .section-subtitle {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* Grid con Flexbox para centrar automáticamente filas incompletas */
.materials-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

/* Tarjeta Editorial con Estilo Referencia[cite: 1] */
.material-card.bg-white {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 370px;
    flex: 1 1 340px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.material-card.bg-white:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(9, 29, 62, 0.12);
}

/* Imagen Principal con Recorte en Diagonal (clip-path)[cite: 1] */
.material-card-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background-color: var(--navy-dark, #051329);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 72% 100%, 0 100%);
}

.material-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.material-card:hover .material-card-img-wrap img {
    transform: scale(1.06);
}

.material-card-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 19, 41, 0.88) 100%);
    pointer-events: none;
}

.material-title-overlay {
    position: absolute;
    bottom: 15px;
    left: 18px;
    z-index: 2;
}

.cantera-card-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-yellow, #f5b000);
    margin-bottom: 6px;
}

.material-card .material-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Cuerpo de la Tarjeta y Miniatura Superpuesta[cite: 1] */
.material-card-body {
    padding: 15px 20px 10px 20px;
    position: relative;
}

.material-specs {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.spec-info {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.68rem;
    color: #718096;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.spec-val {
    font-size: 0.82rem;
    color: var(--navy-blue, #091d3e);
    font-weight: 800;
}

/* Miniatura Superpuesta más grande en Desktop */
.spec-thumb {
    width: 90px;
    height: 75px;
    position: absolute;
    right: 15px;
    top: -48px;
    z-index: 3;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,0.22));
    transition: transform 0.3s ease;
}

.spec-thumb:hover {
    transform: scale(1.08);
}

.spec-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Footer y Botón */
.material-card-footer {
    padding: 10px 20px 20px 20px;
}

.material-card .btn-navy {
    width: 100%;
    padding: 11px 16px;
    background: var(--navy-blue, #091d3e);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.material-card .btn-navy:hover {
    background: var(--primary-yellow, #f5b000);
    color: var(--navy-dark, #051329);
}

/* Responsive para Móviles (2 columnas exactas y estilizadas) */
@media (max-width: 768px) {
    .materials-hero {
        padding: 75px 0;
    }
    
    .materials-hero .premium-title {
        font-size: 1.9rem;
    }

    .categories-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .categories-intro .premium-title {
        font-size: 1.5rem;
    }

    .intro-right {
        max-width: 100%;
    }

    .categories-intro .section-subtitle {
        font-size: 0.85rem;
    }

    .materials-grid {
        gap: 12px;
    }

    .material-card.bg-white {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
        border-radius: 8px;
    }

    .material-card-img-wrap {
        height: 120px;
        clip-path: polygon(0 0, 100% 0, 100% 75%, 70% 100%, 0 100%);
    }

    .material-card .material-title {
        font-size: 0.85rem;
    }

    .spec-thumb {
        width: 55px;   /* Tamaño compacto y proporcionado para móvil */
        height: 48px;
        top: -28px;
        right: 8px;
    }

    /* Añadimos un resguardo a la derecha en el texto para evitar cualquier solapamiento */
    .spec-info {
        padding-right: 50px; 
    }

    .spec-label {
        font-size: 0.55rem;
    }

    .spec-val {
        font-size: 0.68rem;
    }

    .material-card-body {
        padding: 10px 8px 5px 8px;
    }

    .material-card-footer {
        padding: 5px 8px 10px 8px;
    }

    .material-card .btn-navy {
        padding: 7px;
        font-size: 0.65rem;
        gap: 4px;
    }
}

/* ==============================================================================
 * SECCIÓN DE DISPOSICIÓN FINAL (PANAMÁ OESTE) - ESTILO BANNER DE FONDO
 * ==============================================================================
 */

.disposition-sites.section-dark {
    position: relative;
    padding: 90px 0;
    background-image: url('../img/terreno-de-contruccion-cantera.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax en Desktop */
    color: #ffffff;
    overflow: hidden;
}

/* Capa de superposición con gradiente corporativo oscuro */
.disposition-sites.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 18, 41, 0.75) 0%, rgba(5, 29, 64, 0.60) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Asegura que el contenido quede por encima del overlay */
.disposition-sites.section-dark .container {
    position: relative;
    z-index: 2;
}

.disposition-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1240px;
    margin: 0 auto 40px auto;
    padding: 0 15px;
    gap: 30px;
    text-align: left;
}

.disposition-intro .premium-title {
    color: var(--white, #ffffff);
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.disposition-intro .premium-title i {
    color: var(--primary-yellow, #f5b000);
    margin-right: 8px;
    font-size: 1.8rem;
}

.disposition-intro .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.disposition-intro .section-subtitle i {
    color: var(--primary-yellow, #f5b000);
    margin-right: 5px;
}

.disposition-grid {
    display: flex;
    justify-content: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Tarjeta Única Unificada con Efecto Cristal (Glassmorphism) */
.disposition-card-single {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 35px 40px;
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.disposition-card-single:hover {
    transform: translateY(-4px);
    border-color: var(--primary-yellow, #f5b000);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.disposition-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.disposition-icon {
    width: 46px;
    height: 46px;
    background-color: rgba(245, 176, 0, 0.12);
    border: 1px solid var(--primary-yellow, #f5b000);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-yellow, #f5b000);
    font-size: 1.3rem;
}

.disposition-tag {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-yellow, #f5b000);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.disposition-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    color: var(--white, #ffffff);
}

.disposition-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.disposition-desc i {
    color: var(--primary-yellow, #f5b000);
    margin-right: 6px;
}

.disposition-card-single .btn-navy {
    background: var(--primary-yellow, #f5b000);
    color: var(--navy-dark, #051329);
    padding: 13px 20px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast, all 0.3s ease);
}

.disposition-card-single .btn-navy:hover {
    background: #ffffff;
    color: var(--navy-dark, #051329);
    transform: translateY(-2px);
}

/* ==============================================================================
 * ADAPTACIÓN RESPONSIVE (TABLETS Y MÓVILES)
 * ==============================================================================
 */

@media (max-width: 992px) {
    .disposition-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .disposition-intro .premium-title {
        font-size: 1.9rem;
    }
}

/* Ajustes especiales para Tablets y dispositivos intermedios */
@media (max-width: 768px) {
    .disposition-sites.section-dark {
        background-size: cover;
        background-position: center center;
    }

    .disposition-card-single {
        padding: 30px 25px;
    }
    
    /* Alineación limpia hacia la izquierda para dar respiro al ícono y texto en tablets */
    .disposition-header {
        justify-content: flex-start;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    /* Evita que el botón ocupe todo el ancho forzosamente si tiene texto largo */
    .disposition-card-single .btn-navy {
        width: 100%;
        max-width: 100%;
        text-align: center;
        justify-content: center;
        white-space: normal; /* Permite que el texto baje de línea ordenadamente sin estirar el botón */
        padding: 12px 18px;
    }
}

@media (max-width: 576px) {
    .disposition-sites.section-dark {
        padding: 60px 0;
        background-attachment: scroll; /* Desactiva parallax en móvil para optimizar rendimiento */
        background-size: cover;
        background-position: center;
    }

    .disposition-intro .premium-title {
        font-size: 1.6rem;
    }

    .disposition-card-single {
        padding: 22px 18px;
        border-radius: 10px;
    }

    /* Alineación a la izquierda y separación fluida entre el ícono y la etiqueta en móvil */
    .disposition-header {
        justify-content: flex-start;
        gap: 12px;
        margin-bottom: 15px;
    }

    .disposition-tag {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .disposition-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .disposition-desc {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    /* Control estricto para que el botón luzca estético y compacto en pantallas pequeñas */
    .disposition-card-single .btn-navy {
        display: flex;
        width: 100%;
        font-size: 0.82rem;
        padding: 12px 15px;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
}