/* Reset de viewport y prevención de zoom involuntario */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Prevenir overflow horizontal */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* HERO CON VIDEO - IGUAL QUE INMOBILIARIA */
.admin-hero {
    position: relative;
    color: white;
    padding: 180px 2rem 100px;
    text-align: center;
    margin-top: 45px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 44, 62, 0.85), rgba(139, 58, 79, 0.80));
    z-index: 1;
}

.admin-hero h1,
.admin-hero p {
    position: relative;
    z-index: 2;
}

.admin-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.admin-hero p {
    font-size: 1.4rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-hero {
        padding: 150px 1.5rem 80px;
        min-height: 400px;
    }

    .admin-hero h1 {
        font-size: 2rem;
    }

    .admin-hero p {
        font-size: 1.1rem;
    }
}

body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

.admin-hero {
    margin-bottom: 0;
    padding-bottom: 0;
}

.carousel-section {
    background-color: #ffffff;
    margin-top: 0;
    padding-top: 80px;
}

/* CARRUSEL */
.carousel-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 2rem;
    position: relative;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(107, 44, 62, 0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    background: white;
    padding: 4rem 3rem;
}

.carousel-slide h3 {
    color: #6b2c3e;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-slide h3 span {
    font-size: 3rem;
}

.carousel-slide ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.carousel-slide li {
    padding: 1.2rem;
    padding-left: 3rem;
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #8b3a4f;
    font-size: 1.05rem;
    transition: transform 0.3s, background 0.3s;
}

.carousel-slide li:hover {
    transform: translateX(5px);
    background: #fff;
    box-shadow: 0 3px 10px rgba(107, 44, 62, 0.1);
}

.carousel-slide li:before {
    content: "✓";
    position: absolute;
    left: 1rem;
    color: #8b3a4f;
    font-weight: bold;
    font-size: 1.5rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: linear-gradient(135deg, #6b2c3e, #8b3a4f);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(107, 44, 62, 0.3);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-indicators {
    display: flex;
    gap: 0.8rem;
    position: relative;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.indicator.active {
    background: #ddd;
    width: 40px;
    border-radius: 6px;
}

.indicator.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6b2c3e, #8b3a4f);
    border-radius: 6px;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.carousel-container:hover .indicator.active::before {
    animation-play-state: paused;
}

/* EDIFICIOS */
.edificios-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 2rem;
}

.edificios-controls {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.05rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #8b3a4f;
}

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

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.filter-btn:hover {
    border-color: #8b3a4f;
    color: #8b3a4f;
}

.filter-btn.active {
    background: linear-gradient(135deg, #6b2c3e, #8b3a4f);
    color: white;
    border-color: transparent;
}

.edificios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.edificio-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #8b3a4f;
    transition: all 0.3s;
}

.edificio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(107, 44, 62, 0.15);
}

.edificio-card h3 {
    color: #6b2c3e;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edificio-ubicacion {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.edificio-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-badge {
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #555;
    border: 1px solid #e0e0e0;
}

.info-badge strong {
    color: #8b3a4f;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #666;
}

.page-btn:hover {
    border-color: #8b3a4f;
    color: #8b3a4f;
}

.page-btn.active {
    background: linear-gradient(135deg, #6b2c3e, #8b3a4f);
    color: white;
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.edificios-summary {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.edificios-summary span {
    font-weight: 700;
    color: #8b3a4f;
}

/* EQUIPO */
.equipo-section {
    background: #f8f9fa;
    padding: 80px 2rem;
    margin-top: 80px;
}

.equipo-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #6b2c3e, #8b3a4f);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.team-card h3 {
    color: #6b2c3e;
    margin-bottom: 0.5rem;
}

.team-role {
    color: #8b3a4f;
    font-weight: 600;
    margin-bottom: 1rem;
}

.back-button {
    display: inline-block;
    margin: 2rem 0;
    padding: 12px 30px;
    background: linear-gradient(135deg, #6b2c3e, #8b3a4f);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(107, 44, 62, 0.3);
}

@media (max-width: 768px) {
    .carousel-slide {
        padding: 2rem 1.5rem;
    }

    .carousel-slide h3 {
        font-size: 1.6rem;
    }

    .carousel-slide ul {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EQUIPO - GRIDS OPTIMIZADOS
   ============================================ */

.equipo-grupo {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.equipo-grupo-titulo {
    text-align: center;
    color: #8b3a4f;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Grid de 3 columnas (Dirección e Inspectores) */
.equipo-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Grid de 4 columnas (Gestión Administrativa) */
.equipo-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ============================================
   RESPONSIVE - EQUIPO
   ============================================ */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .equipo-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .equipo-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móviles (hasta 768px) */
@media (max-width: 768px) {
    .equipo-grupo {
        padding: 0 1rem;
        margin-bottom: 2.5rem;
    }

    .equipo-grupo-titulo {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    /* TODAS las grids en 1 columna en móvil */
    .equipo-grid-3,
    .equipo-grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .team-card {
        max-width: 100%;
        margin: 0;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .equipo-grupo {
        padding: 0 0.5rem;
    }

    .equipo-grupo-titulo {
        font-size: 1.1rem;
    }

    .team-card {
        padding: 1.2rem;
    }

    .team-avatar {
        width: 90px !important;
        height: 90px !important;
        font-size: 2.2rem !important;
    }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 80px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7);
    }

    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 70px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
}