body {
    background: linear-gradient(120deg, #f4f6fb 60%, #e3e6f3 100%);
    font-family: 'Montserrat', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.contact-section,
section.py-5 {
    min-height: 100vh;
    padding: 48px 0;
    position: relative;
    overflow: hidden;
    animation: fadeInBg 1.2s ease;
    z-index: 1;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

@keyframes fadeInBg {
    from { opacity: 0; }
    to { opacity: 1; }
}

section.py-5::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../img/Contactos/bg.jpg') center/cover no-repeat fixed, radial-gradient(circle at 80% 20%, #e0e7ff 0%, transparent 70%);
    filter: blur(10px) brightness(0.93);
    z-index: 0;
    opacity: 0.65;
    pointer-events: none;
    animation: bgMove 12s linear infinite alternate;
}

@keyframes bgMove {
    0% { background-position: center 0px, 80% 20%; }
    100% { background-position: center 40px, 75% 25%; }
}

.card {
    border-radius: 1.5rem;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 8px 32px 0 rgba(44, 44, 84, 0.13);
    border: none;
    transition: transform 0.25s cubic-bezier(.77,0,.18,1), box-shadow 0.25s;
    will-change: transform, box-shadow;
    opacity: 0;
    animation: fadeInCard 0.9s cubic-bezier(.77,0,.18,1) 0.5s forwards;
    position: relative;
    z-index: 1;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(40px) scale(0.97);}
    to { opacity: 1; transform: translateY(0) scale(1);}
}

.card:hover {
    transform: translateY(-8px) scale(1.025);
    box-shadow: 0 16px 40px 0 rgba(44, 44, 84, 0.18);
}

.card-img-top {
    border-radius: 1.5rem 1.5rem 0 0;
    object-fit: cover;
    height: 180px;
    width: 100%;
    transition: filter 0.3s;
    background: #f4f6fb;
}

.card-img-top:hover {
    filter: brightness(0.93) blur(1px);
}

.card-body {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    animation: fadeInCard 1.2s cubic-bezier(.77,0,.18,1) 0.7s both;
}

h2 {
    color: #23233a;
    font-size: 2.2rem;
    line-height: 1.15;
    letter-spacing: 1px;
    font-weight: 800;
    animation: fadeInCard 1.2s cubic-bezier(.77,0,.18,1) 0.8s both;
}

h5, h6 {
    color: #23233a;
    font-size: 1.15rem;
    letter-spacing: 0.7px;
    font-weight: 700;
}

.small {
    color: #444;
    font-size: 1rem;
}

.bi {
    color: #3a3a5a;
    font-size: 1.15em;
    vertical-align: middle;
}

.form-control {
    border-radius: 0.75rem;
    border: 1.5px solid #e0e0e0;
    background: #f8f9fa;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #23233a;
    box-shadow: 0 0 0 2px rgba(44,44,84,0.10);
    background: #fff;
}

.form-floating > label {
    color: #888;
    font-size: 1rem;
    padding-left: 0.5rem;
}

.btn-primary {
    background: linear-gradient(90deg, #23233a 60%, #3a3a5a 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: 700;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(44,44,84,0.07);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(90deg, #3a3a5a 60%, #23233a 100%);
    box-shadow: 0 4px 16px 0 rgba(44,44,84,0.13);
}

@media (max-width: 991.98px) {
    .container {
        max-width: 98%;
    }
    .card {
        border-radius: 1rem;
    }
    .card-img-top {
        height: 120px;
    }
    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    section.py-5 {
        padding: 24px 0;
    }
    .card {
        border-radius: 0.75rem;
        margin-bottom: 1.5rem;
    }
    .card-img-top {
        border-radius: 0.75rem 0.75rem 0 0;
        height: 90px;
    }
    h2 {
        font-size: 1.15rem;
    }
    .col-md-7 .card {
        padding: 1rem;
    }
    .row.mb-3 > .col {
        margin-bottom: 1rem;
    }
}

.ubicacion-section {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(44, 44, 84, 0.08);
    margin-top: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    padding: 2.5rem 0;
}

.mapa-wrapper,
.ratio.ratio-16x9 {
    background: #f8f9fa;
    border-radius: 1rem;
    box-shadow: 0 2px 12px 0 rgba(44,44,84,0.07);
    overflow: hidden;
    min-height: 300px;
}

.ratio.ratio-16x9 iframe {
    border-radius: 1rem;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.ubicacion-section h6 {
    color: #23233a;
    font-weight: 700;
    font-size: 1.1rem;
}

.ubicacion-section p {
    color: #444;
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    .ubicacion-section {
        border-radius: 1rem;
        padding: 1.5rem 0;
    }
    .mapa-wrapper,
    .ratio.ratio-16x9,
    .ratio.ratio-16x9 iframe {
        border-radius: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .ubicacion-section {
        border-radius: 0.75rem;
        padding: 1rem 0;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    .mapa-wrapper,
    .ratio.ratio-16x9,
    .ratio.ratio-16x9 iframe {
        border-radius: 0.5rem;
        min-height: 180px;
    }
}