
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #182338;
    background: #f7f8fb;
}

.gallery-header {
    min-height: 90px;
    padding: 15px 7%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e8ebf1;
}

.gallery-brand img {
    display: block;
    width: 210px;
    max-height: 75px;
    object-fit: contain;
}

.back-link {
    color: #254c91;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.back-link:hover {
    color: #a51d16;
}

.gallery-container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

.gallery-intro {
    text-align: center;
    padding: 75px 0 45px;
}

.gallery-label {
    color: #a51d16;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
}

.gallery-intro h1 {
    margin: 15px 0;
    color: #15284a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.gallery-intro p {
    max-width: 650px;
    margin: 0 auto;
    color: #687386;
    font-size: 16px;
    line-height: 1.7;
}

.gallery-line {
    width: 65px;
    height: 4px;
    margin: 25px auto 0;
    border-radius: 5px;
    background: #a51d16;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 70px;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 5px 20px #15284a12;
    text-decoration: none;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 35px 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(transparent, #07152be8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-icon {
    font-size: 23px;
}

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

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

.gallery-contact {
    margin: 0 0 65px;
    padding: 45px 20px;
    text-align: center;
    background: #15284a;
    color: #fff;
    border-radius: 14px;
}

.gallery-contact h2 {
    margin: 0 0 12px;
    font-size: clamp(23px, 3vw, 32px);
}

.gallery-contact p {
    color: #d6deeb;
    margin-bottom: 25px;
}

.contact-button {
    display: inline-block;
    padding: 14px 25px;
    background: #a51d16;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.contact-button:hover {
    background: #c12b23;
}

.gallery-footer {
    padding: 25px 15px;
    text-align: center;
    color: #758096;
    background: #fff;
    border-top: 1px solid #e8ebf1;
    font-size: 13px;
}

@media (max-width: 850px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .gallery-intro {
        padding-top: 55px;
    }
}

@media (max-width: 520px) {
    .gallery-header {
        min-height: 75px;
        padding: 12px 5%;
    }

    .gallery-brand img {
        width: 145px;
        max-height: 55px;
    }

    .back-link {
        font-size: 12px;
    }

    .gallery-container {
        width: 92%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    .gallery-overlay {
        opacity: 1;
    }

    .gallery-intro {
        padding: 45px 0 35px;
    }

    .gallery-contact {
        padding: 35px 18px;
    }
}


/* Categorías de proyectos */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 70px;
}

.category-card {
    overflow: hidden;
    color: #15284a;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 5px 22px #15284a12;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px #15284a20;
}

.category-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e4e8ef;
}

.category-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px 11px;
    color: #fff;
    background: #15284ae8;
    border-radius: 5px;
    font-size: 12px;
}

.category-info {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-info h2 {
    margin: 0;
    font-size: 18px;
}

.category-arrow {
    color: #a51d16;
    font-size: 24px;
}

.back-categories {
    margin: 0 0 25px;
}

.back-categories a {
    color: #254c91;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 850px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

