﻿/* ========== CATALOGOSERVICIOS.ASPX - RESPONSIVE OPTIMIZATION ========== */

.product-card::after {
    content: "SERVICIO";
    position: absolute;
    top: 18px;
    left: 18px;
    background: #F4B400;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 50px;
    letter-spacing: 0.8px;
    z-index: 10;
}

/* ========== TABLETS LARGE (≤ 992px) ========== */
@media (max-width: 992px) {
    .product-card::after {
        top: 12px;
        left: 12px;
        font-size: 11px;
        padding: 6px 14px;
    }
}

/* ========== TABLETS (≤ 768px) ========== */
@media (max-width: 768px) {
    .product-card::after {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 5px 12px;
    }

    .product-img {
        height: 180px !important;
    }

    .product-content h4 {
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
        line-height: 1.5;
    }

    .btn-industrial {
        font-size: 15px !important;
        padding: 8px 14px !important;
    }
}

/* ========== MÓVILES (≤ 576px) ========== */
@media (max-width: 576px) {
    .product-card::after {
        top: 8px;
        left: 8px;
        font-size: 12px;
        padding: 4px 10px;
    }

    .col-lg-3,
    .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .product-img {
        height: 160px !important;
    }

    .product-content h4 {
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
        line-height: 1.5;
    }

    .btn-industrial {
        font-size: 15px !important;
        padding: 7px 12px !important;
        min-height: 38px !important;
    }

    .product-footer {
        margin-top: 8px !important;
    }
}

/* ========== MÓVILES PEQUEÑOS (≤ 450px) ========== */
@media (max-width: 450px) {
    .product-card::after {
        top: 6px;
        left: 6px;
        font-size: 12px;
        padding: 3px 8px;
    }

    .product-img {
        height: 140px !important;
    }

    .product-content h4 {
        font-size: 17px !important;
        margin-bottom: 6px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
        line-height: 1.4;
    }

    .btn-industrial {
        font-size: 15px !important;
        padding: 6px 10px !important;
        min-height: 36px !important;
    }

    .product-card {
        border-radius: 8px !important;
    }

    .product-content {
        padding: 12px !important;
    }
}

/* ========== EXTRA PEQUEÑOS (≤ 380px) ========== */
@media (max-width: 380px) {
    .product-card::after {
        font-size: 12px;
        padding: 2px 6px;
    }

    .product-img {
        height: 120px !important;
    }

    .product-content h4 {
        font-size: 17px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
    }

    .btn-industrial {
        font-size: 15px !important;
        padding: 5px 8px !important;
    }
}

/* ========== HERO SECTION RESPONSIVE ========== */

.hero h1 {
    font-size: 62px !important;
}

.hero p {
    font-size: 20px !important;
}

@media (max-width: 992px) {
    .hero {
        padding: 140px 0 90px !important;
    }

    .hero h1 {
        font-size: 52px !important;
    }

    .hero p {
        font-size: 18px !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 110px 20px 80px !important;
    }

    .hero h1 {
        font-size: 40px !important;
        margin-bottom: 15px !important;
    }

    .hero p {
        font-size: 16px !important;
        max-width: 100% !important;
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 80px 15px 60px !important;
    }

    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 12px !important;
    }

    .hero p {
        font-size: 15px !important;
        padding: 0 10px;
    }
}

@media (max-width: 450px) {
    .hero {
        padding: 70px 10px 50px !important;
    }

    .hero h1 {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }

    .hero p {
        font-size: 15px !important;
    }
}

@media (max-width: 380px) {
    .hero {
        padding: 60px 8px 40px !important;
    }

    .hero h1 {
        font-size: 20px !important;
    }

    .hero p {
        font-size: 15px !important;
    }
}

/* ========== SEARCH SECTION RESPONSIVE ========== */

@media (max-width: 768px) {
    .bi-search {
        font-size: 18px !important;
        left: 15px !important;
    }

    #txtBuscar {
        height: 50px !important;
        font-size: 16px !important;
        padding-left: 45px !important;
        border-radius: 40px;
    }

    #btnBuscar,
    #btnLimpiar {
        height: 44px !important;
        font-size: 15px !important;
        padding: 10px 20px !important;
    }
}

@media (max-width: 576px) {
    #txtBuscar {
        height: 44px !important;
        font-size: 16px !important;
        padding-left: 40px !important;
        border-radius: 40px;
    }

    .bi-search {
        font-size: 16px !important;
        left: 12px !important;
    }

    #btnBuscar,
    #btnLimpiar {
        height: 44px !important;
        font-size: 15px !important;
        padding: 10px 16px !important;
        min-height: 44px !important;
        width: auto !important;
    }

    .col-lg-8 {
        width: 100% !important;
    }
}

@media (max-width: 450px) {
    #txtBuscar {
        height: 40px !important;
        font-size: 16px !important;
        padding-left: 38px !important;
        border-radius: 35px;
    }

    .bi-search {
        font-size: 14px !important;
        left: 10px !important;
    }

    #btnBuscar,
    #btnLimpiar {
        display: block !important;
        width: 100% !important;
        height: 40px !important;
        font-size: 15px !important;
        padding: 8px 12px !important;
        margin-top: 8px !important;
        margin-left: 0 !important;
    }

    .row.mb-3 {
        margin-bottom: 0 !important;
    }

    section[style*="margin-top: -45px"] {
        padding: 20px 0 !important;
        margin-top: -35px !important;
    }

    section[style*="padding: 80px"] {
        padding: 30px 0 !important;
    }

    .container {
        padding: 0 8px !important;
    }
}

@media (max-width: 380px) {
    #txtBuscar {
        height: 38px !important;
        font-size: 16px !important;
    }

    #btnBuscar,
    #btnLimpiar {
        height: 38px !important;
        font-size: 15px !important;
    }
}

/* ========== SEARCH BOX WRAPPER RESPONSIVE ========== */

@media (max-width: 576px) {
    div[style*="background: white; padding: 35px"] {
        padding: 20px !important;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(15, 61, 94, 0.08) !important;
    }
}

@media (max-width: 450px) {
    div[style*="background: white; padding: 35px"] {
        padding: 15px !important;
        border-radius: 12px;
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 40px 0 30px !important;
    }

    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 6px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    #txtBuscar {
        height: 38px !important;
    }

    #btnBuscar,
    #btnLimpiar {
        height: 38px !important;
    }
}

/* ========== UNIFORM CARD STYLING FOR SERVICES ========== */

/* Base Product Card (Services) */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 61, 94, 0.1);
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    box-shadow: 0 8px 20px rgba(15, 61, 94, 0.15);
    transform: translateY(-2px);
}

/* Service Image */
.product-img {
    width: 100% !important;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
}

/* Service Content Container */
.product-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1;
    padding: 16px 12px;
    gap: 8px;
}

/* Service Title */
.product-content h4 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #0F3D5E;
    line-height: 1.3;
    flex-grow: 1;
}

/* Service Description/Excerpt */
.product-excerpt {
    margin: 0 !important;
    font-size: 13px !important;
    color: #6B7280;
    line-height: 1.4;
    flex-grow: 1;
}

/* Service Footer (buttons) */
.product-footer {
    margin-top: auto;
    padding-top: 8px;
}

/* Action Link/Button */
.btn-industrial {
    display: inline-block;
    min-height: 40px;
    padding: 10px 16px !important;
    background: #F4B400;
    color: #000 !important;
    font-size: 13px !important;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #F4B400;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-industrial:hover {
    background: #d49700;
    border-color: #d49700;
    color: white !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(244, 180, 0, 0.3);
}

/* ========== MOBILE CARD ADAPTATIONS FOR SERVICES ========== */

@media (max-width: 768px) {
    .product-card {
        border-radius: 10px !important;
    }

    .product-img {
        height: 180px;
    }

    .product-content {
        padding: 14px 11px;
        gap: 6px;
    }

    .product-content h4 {
        font-size: 17px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
    }

    .btn-industrial {
        min-height: 38px;
        padding: 8px 14px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 576px) {
    .product-card {
        border-radius: 9px !important;
    }

    .product-img {
        height: 160px;
    }

    .product-content {
        padding: 12px 10px;
        gap: 5px;
    }

    .product-content h4 {
        font-size: 17px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
    }

    .btn-industrial {
        min-height: 40px;
        padding: 8px 12px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 450px) {
    .col-lg-3.col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 12px;
    }

    .product-card {
        border-radius: 8px !important;
    }

    .product-img {
        height: 140px;
    }

    .product-content {
        padding: 11px 9px;
        gap: 4px;
    }

    .product-content h4 {
        font-size: 17px !important;
        line-height: 1.2;
    }

    .product-excerpt {
        font-size: 15px !important;
        max-height: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-industrial {
        min-height: 38px;
        padding: 7px 10px !important;
        font-size: 15px !important;
    }

    .product-category-badge {
        font-size: 12px !important;
        padding: 2px 5px !important;
    }
}

@media (max-width: 380px) {
    .product-img {
        height: 120px;
    }

    .product-content {
        padding: 10px 8px;
    }

    .product-content h4 {
        font-size: 17px !important;
    }

    .product-excerpt {
        font-size: 15px !important;
    }

    .btn-industrial {
        min-height: 36px;
        padding: 6px 8px !important;
        font-size: 15px !important;
    }
}

/* ========== CARD TITLE LINK - Interactive and Elegant ========== */
.card-title-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
}

.card-title-link:hover {
    color: #0F3D5E;
    text-shadow: 0 1px 3px rgba(15, 61, 94, 0.2);
}

/* Línea de acento sutil al hover */
.card-title-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #F4B400, #d49700);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title-link:hover::after {
    width: 30px;
}

/* ========== TARJETAS EN MÓVIL (1 columna) ==========
   style.css fija ".product-card img { height: 95px !important }" en <=480px pensando en miniaturas;
   aquí cada tarjeta ocupa todo el ancho, así que se restablece imagen y espaciado. */
@media (max-width: 768px) {
    .product-card img.product-img {
        height: 210px !important;
        object-fit: cover;
    }

    .product-card .product-content {
        padding: 18px 18px 20px !important;
        gap: 8px;
    }

    .product-card .product-content h4 {
        line-height: 1.3 !important;
    }

    .product-card .product-excerpt {
        line-height: 1.6 !important;
        max-height: none;
    }

    .product-card .btn-industrial {
        min-height: 46px !important;
        padding: 12px 18px !important;
    }
}

@media (max-width: 450px) {
    .product-card img.product-img {
        height: 190px !important;
    }

    .product-card .product-content {
        padding: 16px 16px 18px !important;
    }
}
