:root {
    --brand-gold: #b99149;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-light: #e5e9f0;
    --input-bg: #fdfdfd;
    --btn-bg: #33302e;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: #ffffff;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

.custom-footer {
    width: 100%;
    background-color: #ffffff;
    padding: 70px 0 30px 0;
    border-top: 1px solid var(--border-light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- PRIMER BLOQUE: COLUMNAS PRINCIPALES --- */
.footer-main-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 0.9fr) 1.2fr;
    gap: 30px;
    margin-bottom: 50px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    max-width: 175px;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

.brand-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 400;
}

.social-container {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.social-box {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-box:hover {
    color: var(--brand-gold);
    border-color: var(--brand-gold);
    transform: translateY(-2px);
}

.footer-links-col h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 22px;
    letter-spacing: 0.5px;
    color: #000000;
}

.footer-links-col ul {
    list-style: none;
}

.footer-links-col ul li {
    margin-bottom: 12px;
}

.footer-links-col ul li a {
    font-size: 13.5px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-links-col ul li a:hover {
    color: var(--brand-gold);
}

.newsletter-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    width: 100%;
    height: 46px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
}

.newsletter-input {
    flex: 1;
    border: none;
    background-color: var(--input-bg);
    padding: 0 15px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-dark);
    outline: none;
}

.newsletter-input::placeholder {
    color: #999999;
}

.newsletter-btn {
    width: 50px;
    background-color: var(--btn-bg);
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.newsletter-btn:hover {
    background-color: var(--brand-gold);
}

/* --- SEPARADORES HORIZONTALES --- */
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-light);
    margin: 0;
}

/* --- SEGUNDO BLOQUE: NUESTRAS OFICINAS --- */
.offices-section {
    padding: 30px 0;
    text-align: center;
}

.offices-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.offices-title i {
    color: var(--brand-gold);
    font-size: 19px;
}

.offices-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.office-item {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    color: #000000;
    letter-spacing: 0.5px;
}

.office-pipe {
    width: 1px;
    height: 22px;
    background-color: #ccd2db;
    margin: 0 25px;
}

/* --- TERCER BLOQUE: DATOS DE CONTACTO Y COPYRIGHT --- */
.footer-bottom-bar {
    padding: 25px 0 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info-group {
    display: flex;
    align-items: center;
    gap: 35px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--brand-gold);
}

.contact-link .icon-wrap {
    width: 32px;
    height: 32px;
    background-color: #f0f3f8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.contact-link:hover .icon-wrap {
    background-color: var(--brand-gold);
    color: #ffffff;
}

.bottom-pipe {
    width: 1px;
    height: 30px;
    background-color: #ccd2db;
}

.copyright-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    text-align: right;
}

/* --- SISTEMA RESPONSIVO OPTIMIZADO --- */

/* Tablets grandes y Pantallas Medianas (Laptops) */
@media (max-width: 1100px) {
    .footer-main-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 40px 30px;
    }
    /* Hacemos que la columna de newsletter ocupe todo el ancho disponible si es necesario o se redistribuya */
    .footer-main-grid .footer-links-col:nth-child(5) {
        grid-column: span 3;
        max-width: 500px;
    }
    .office-pipe {
        margin: 0 15px;
    }
}

/* Tablets medianas y verticales */
@media (max-width: 768px) {
    .custom-footer {
        padding: 50px 0 30px 0;
    }
    .footer-main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px 20px;
    }
    .footer-brand-col {
        grid-column: span 2;
        margin-bottom: 10px;
    }
    .footer-main-grid .footer-links-col:nth-child(5) {
        grid-column: span 2;
        max-width: 100%;
    }
    .social-container {
        margin-top: 20px;
    }
    .offices-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px 10px;
    }
    .office-pipe, .bottom-pipe {
        display: none;
    }
    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 25px;
    }
    .contact-info-group {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    .contact-link {
        justify-content: center;
        width: 100%;
    }
    .copyright-text {
        text-align: center;
        width: 100%;
        margin-top: 5px;
    }
}

/* Smartphones y pantallas pequeñas */
@media (max-width: 480px) {
    .footer-main-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .footer-brand-col, 
    .footer-main-grid .footer-links-col:nth-child(5) {
        grid-column: span 1;
    }
    .footer-links-col h4 {
        margin-bottom: 16px;
        font-size: 17px;
    }
    .offices-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 8px;
    }
    .office-item {
        font-size: 12px;
    }
}