/* ===================== VARIABLES GLOBALES ===================== */
:root {
    --top-header-height: 40px;  /* altura del header fijo */
    --navbar-height: 80px;      /* altura del navbar */
}

/* ===================== AJUSTE GLOBAL ===================== */
body {
    margin: 0;
    padding-top: calc(var(--top-header-height) + var(--navbar-height));
    box-sizing: border-box;
}

/* ===================== MAIN Y SECCIONES ===================== */
main, .quienes-somos {
    margin-top: 0; /* ya el body tiene padding */
}

/* ===================== CARRUSEL ===================== */
#heroCarousel .carousel-item {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

#heroCarousel .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
}

#heroCarousel .carousel-caption h5 {
    font-size: 2rem;
    color: white;
}

/* ===================== NOSOTROS ===================== */
.about-collage {
    padding: 60px 0;
    background-color: rgba(249, 249, 249, 0.8);
}

.about-collage .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    background-color: rgba(249, 249, 249, 0.8);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.about-text {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.about-text h2 {
    color: #1E3A8A;
    margin-bottom: 10px;
}

.about-images {
    flex: 1 1 50%;
}

.img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.img-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.img-grid img:hover {
    transform: scale(1.05) translateY(-5px);
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.05) translateY(-5px); }
    50% { transform: scale(1.05) translateY(-15px); }
}

.btn-saber-mas {
    background-color: rgb(9, 69, 123);
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    align-self: flex-end;
    width: 40%;
}

.btn-saber-mas:hover {
    background-color: #D29C27;
    transform: translateY(-2px);
}

/* RESPONSIVE NOSOTROS */
@media (max-width: 768px) {
    .about-images .img-grid {
        grid-template-columns: 1fr;
    }
    .about-text {
        text-align: center;
    }
    .btn-saber-mas {
        margin: 10px auto;
        display: block;
        width: 80%;
    }
}

/* ===================== WHY CHOOSE US ===================== */
.choose-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.choose-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 220px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.choose-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.choose-card img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

/* ===================== NUMBERS ===================== */
.number-card {
    background: linear-gradient(135deg, #1E3A8A, #D29C27);
    color: white;
    border-radius: 15px;
    padding: 40px 20px;
    transition: transform 0.5s, box-shadow 0.5s;
    cursor: pointer;
}

.number-card h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.number-card:hover {
    transform: rotateY(15deg) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ===================== CONDOMINIOS ===================== */
.condominios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-items: center;
}

.condominio-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    height: 300px;
    width: 100%;
}

.condominio-card.single-row {
    grid-column: 1 / -1;
    max-width: 400px;
}

.condominio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.condominio-card:hover img {
    transform: scale(1.1) translateY(-5px);
    filter: brightness(0.85);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    backdrop-filter: blur(3px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .condominios-grid { grid-template-columns: repeat(2, 1fr); }
    .condominio-card.single-row { max-width: 100%; }
}

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

/* ===================== CONTACTO ===================== */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.contact-info {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s, color 0.3s;
    cursor: pointer;
}

.contact-info .info-item i {
    font-size: 1.5rem;
    color: #FFD166;
}

.contact-info .info-item:hover {
    transform: translateX(5px);
    color: #FFD166;
}

.contact-form {
    flex: 1 1 400px;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #555;
}

.contact-form button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #FFD166;
    color: #1E3A8A;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.contact-form button:hover {
    background-color: #FFC53A;
    transform: translateY(-3px);
}

/* RESPONSIVE CONTACTO */
@media (max-width: 992px) {
    .contact-grid {
        flex-direction: column;
        align-items: center;
        gap: 70px;
    }

    .contact-info,
    .contact-form {
        flex: 1 1 100%;
        max-width: 500px;
    }

    .contact-section {
        margin-top: 0;
    }
}

/* ===================== WHATSAPP FLOAT ===================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
