/**
 * Landing Page Proyectos - Estilo Corporativo Profesional
 * Inspirado en diseño corporativo de ingeniería
 */

/* ========================================
   Variables
   ======================================== */
:root {
    --primary: #003d52;
    --primary-light: #0a5269;
    --accent: #e67e22;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --border: #dee2e6;
}

/* ========================================
   Skip Link para accesibilidad
   ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Hero con Imagen de Fondo
   ======================================== */
.hero-proyectos-modern {
    position: relative;
    background: var(--primary);
}

.hero-overlay {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 61, 82, 0.92), rgba(0, 61, 82, 0.75));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 2rem;
}

.hero-actions .btn-modern {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.hero-actions .btn-modern:hover {
    background: #d35400;
    color: #fff;
}

.scroll-indicator {
    display: none;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb-modern {
    padding: 1rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-modern .breadcrumbs {
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb-modern .breadcrumbs ol.breadcrumb-list {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-modern .breadcrumbs ol.breadcrumb-list .breadcrumb-item {
    display: flex !important;
    float: none !important;
    align-items: center;
}

.breadcrumb-modern .breadcrumbs ol.breadcrumb-list .breadcrumb-item + .breadcrumb-item::before {
    display: none !important;
}

.breadcrumb-modern .breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-modern .breadcrumbs a:hover {
    text-decoration: underline;
}

/* ========================================
   Estadísticas
   ======================================== */
.stats-modern {
    padding: 4rem 0;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-card {
    padding: 1.5rem;
}

.stat-icon {
    display: none;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-desc {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ========================================
   Sección Intro
   ======================================== */
.intro-modern {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-title-modern {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   Filtros
   ======================================== */
.filters-modern {
    padding: 2rem 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.filters-header {
    display: none;
}

/* Buscador de proyectos */
.search-projects {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 15px;
    color: var(--text);
    transition: all 0.3s;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 61, 82, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-light);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-clear:hover {
    background: var(--primary);
}

.filters-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Filters footer con contador y toggle */
.filters-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

/* Contador de resultados */
.results-counter {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.results-count-number {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

/* Toggle de vista */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: #fff;
    padding: 0.25rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.view-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    color: #fff;
}

/* ========================================
   Grid de Proyectos - Estilo Cards Limpio
   ======================================== */
.projects-modern {
    padding: 4rem 0;
    background: var(--bg-light);
}

.projects-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card-modern {
    opacity: 1;
    transition: opacity 0.3s;
}

.project-card-modern.hide,
.project-card-modern.hide-search {
    display: none;
}

/* Skeleton loading durante filtrado */
.projects-masonry.loading {
    position: relative;
    pointer-events: none;
}

.projects-masonry.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 249, 250, 0.8);
    z-index: 10;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.projects-masonry.loading .project-card-modern {
    opacity: 0.3;
}

.project-card-inner {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card-inner:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.project-image-modern {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
    background: var(--bg-light);
}

.project-image-modern img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card-inner:hover .project-image-modern img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 61, 82, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card-inner:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}

.project-overlay .view-project {
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.project-card-inner:hover .project-overlay .view-project {
    transform: translateY(0);
}

.project-content-modern {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    margin-bottom: 1rem;
}

.project-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.project-title-modern {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.project-title-modern a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.project-title-modern a:hover {
    color: var(--primary);
}

.project-excerpt-modern {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.project-meta-modern {
    display: flex;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-bottom: 1rem;
}

.meta-item-modern {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    color: var(--text-light);
}

.meta-item-modern i {
    color: var(--primary);
    font-size: 14px;
}

.project-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s;
}

.project-link-modern:hover {
    gap: 0.75rem;
    color: var(--primary-light);
}

/* ========================================
   Vista de Lista
   ======================================== */
.projects-masonry.view-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.projects-masonry.view-list .project-card-modern {
    max-width: 100%;
}

.projects-masonry.view-list .project-card-inner {
    display: flex;
    flex-direction: row;
    height: auto;
}

.projects-masonry.view-list .project-image-modern {
    width: 350px;
    min-width: 350px;
    padding-top: 0;
    height: auto;
    min-height: 250px;
}

.projects-masonry.view-list .project-image-modern img {
    position: static;
    height: 100%;
}

.projects-masonry.view-list .project-content-modern {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-masonry.view-list .project-title-modern {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.projects-masonry.view-list .project-excerpt-modern {
    display: block;
}

/* ========================================
   Paginación
   ======================================== */
.pagination-modern {
    margin-top: 3rem;
    text-align: center;
}

.pagination-modern .page-numbers {
    display: inline-block;
    padding: 0.75rem 1.125rem;
    margin: 0 0.25rem;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-modern .page-numbers:hover,
.pagination-modern .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ========================================
   CTA
   ======================================== */
.cta-modern {
    padding: 5rem 0;
    background: var(--primary);
    text-align: center;
}

.cta-title-modern {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.cta-text-modern {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons-modern {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-light {
    display: inline-block;
    padding: 1rem 2rem;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-primary-light:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.btn-outline-light {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--primary);
}

/* ========================================
   Beneficios
   ======================================== */
.benefits-modern {
    padding: 4rem 0;
    background: #fff;
}

.benefits-modern .section-title-modern {
    text-align: center;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.benefit-card-modern {
    padding: 2rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 4px;
}

.benefit-icon-modern {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
}

.benefit-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.benefit-desc-modern {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* ========================================
   Formulario
   ======================================== */
.contact-modern {
    padding: 4rem 0;
    background: var(--bg-light);
}

.contact-box-modern {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 1rem;
}

.contact-desc-modern {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-form-modern input[type="text"],
.contact-form-modern input[type="email"],
.contact-form-modern input[type="tel"],
.contact-form-modern textarea,
.contact-form-modern select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 1.25rem;
    transition: border-color 0.3s;
}

.contact-form-modern input:focus,
.contact-form-modern textarea:focus,
.contact-form-modern select:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-form-modern input[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form-modern input[type="submit"]:hover {
    background: #d35400;
}

/* ========================================
   Sin Proyectos
   ======================================== */
.no-projects {
    text-align: center;
    padding: 4rem 0;
}

.no-projects i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 1.5rem;
}

.no-projects p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .projects-masonry {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-overlay {
        min-height: 400px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .filters-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tab {
        white-space: nowrap;
    }

    .filters-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .projects-masonry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-masonry.view-list .project-card-inner {
        flex-direction: column;
    }

    .projects-masonry.view-list .project-image-modern {
        width: 100%;
        min-width: 100%;
        padding-top: 60%;
        min-height: 0;
    }

    .projects-masonry.view-list .project-image-modern img {
        position: absolute;
        top: 0;
        left: 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .contact-box-modern {
        padding: 2rem;
    }

    .cta-buttons-modern {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .contact-box-modern {
        padding: 1.5rem;
    }
}

/* ========================================
   Tags de Vertical de Negocio en tarjetas
   ======================================== */
.project-tag-servicio {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
      color: #fff;
    transition: color 0.2s ease, background 0.2s ease;
}

.project-tag-servicio:hover {
    color: #fff;
    background: var(--accent);
    text-decoration: none;
}

/* Múltiples tags de servicio en una tarjeta */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ========================================
   Utilidades
   ======================================== */
.text-center {
    text-align: center !important;
}
