/* ======================================== Start Comunidad ======================================== */
#start-comunidad {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 6rem 0 4rem;
    margin-top: 3rem;
    overflow: hidden;
    position: relative;
}

#start-comunidad .row {
    align-items: center;
    transition: all 0.5s ease;
    margin-top: 2rem;
}

/* Card Principal */
#start-comunidad .col-md {
    background: #ffffff;
    border-radius: 15px;
    padding: 2.5rem;
    margin: 1.5rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.08);
    position: relative;
    transform: translateY(20px);
    animation: sectionEntrance 1s ease-out forwards;
}

/* Card de la Imagen Principal */
#start-comunidad .col-md > .text-center {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: -3rem auto 2rem;
    width: fit-content;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transform: translateY(-1rem);
    transition: all 0.3s ease;
}

#start-comunidad .col-md > .text-center img {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

/* Texto */
#start-comunidad p {
    color: #444 !important;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid rgba(0,0,0,0.1);
}

#start-comunidad p strong {
    color: #222 !important;
    position: relative;
    font-weight: 600;
}

#start-comunidad p strong::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #444 50%, transparent 100%);
}

/* Card Lateral Derecha */
#start-comunidad .col-md-2 {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    width: fit-content;
    margin-left: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#start-comunidad .col-md-2 img {
    width: 120px;
    height: auto;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

/* Animaciones */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

@keyframes sectionEntrance {
    to { transform: translateY(0); }
}

/* Efectos Hover */
#start-comunidad .col-md:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

#start-comunidad .col-md > .text-center:hover {
    transform: translateY(-1.5rem) rotate(2deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

#start-comunidad .col-md-2:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

#start-comunidad .col-md-2:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Responsive Design */
@media (max-width: 992px) {
    #start-comunidad {
        padding: 5rem 0 3rem;
        margin-top: 2rem;
    }
    
    #start-comunidad .row {
        flex-direction: column;
        text-align: center;
    }
    
    #start-comunidad .col-md-1 {
        display: none;
    }
    
    #start-comunidad .col-md {
        margin: 1rem 0;
        padding: 2rem;
    }
    
    #start-comunidad .col-md > .text-center {
        margin: -2rem auto 1.5rem;
        padding: 1rem;
    }
    
    #start-comunidad p {
        padding-left: 0;
        border-left: none;
        text-align: center;
        font-size: 1rem;
    }
    
    #start-comunidad .col-md-2 {
        margin: 2rem auto 0;
        padding: 1.2rem;
    }
}

@media (max-width: 576px) {
    #start-comunidad {
        padding: 3rem 0 2rem;
        margin-top: 1.5rem;
    }
    
    #start-comunidad .col-md {
        padding: 1.5rem;
    }
    
    #start-comunidad .col-md > .text-center img {
        max-width: 180px;
    }
    
    #start-comunidad p {
        font-size: 0.95rem;
    }
    
    #start-comunidad .col-md-2 img {
        width: 100px;
    }
}

@media (max-width: 400px) {
    #start-comunidad {
        padding: 2rem 0;
        margin-top: 1rem;
    }
    
    #start-comunidad .col-md {
        padding: 1.2rem;
    }
    
    #start-comunidad p {
        font-size: 0.9rem;
    }
    
    #start-comunidad .col-md > .text-center img {
        max-width: 160px;
    }
    
    #start-comunidad .col-md-2 img {
        width: 85px;
    }
}

/* ======================================== Areas ======================================== */
#areas {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 2rem;
    background: linear-gradient(135deg, #2A4D6E 0%, #71B3C3 100%);
}

.areas-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centrado horizontal agregado */
    animation: cardEntrance 1s ease-out forwards;
}

.areas-card:hover {
    transform: translateY(-5px) rotate(1deg);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.areas-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto;
    display: block; /* Aseguramos centrado perfecto */
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
    animation: iconFloat 3s ease-in-out infinite;
}

.areas-card:hover img {
    transform: scale(1.05) rotate(-5deg);
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15));
}

.areas-card-title {
    color: #fff;
    font-size: 1.2rem;
    margin: 1rem 0 0;
    position: relative;
    padding-bottom: 0.5rem;
    text-align: center;
    line-height: 1.4;
    width: 100%; /* Aseguramos ancho completo para centrado */
}

.areas-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #fff 50%, transparent 100%);
    transition: width 0.3s ease;
}

.areas-card:hover .areas-card-title::after {
    width: 60px;
}

.areas-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    animation: titleEntrance 1s ease-out;
}

.areas-subtitle {
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
    animation: subtitleEntrance 1s ease-out;
    margin-top: 1.5rem;
}

@keyframes iconFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleEntrance {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes subtitleEntrance {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 992px) {
    .areas-card {
        min-height: 180px;
        padding: 1rem;
    }
    
    .areas-card img {
        width: 60px;
        height: 60px;
    }
    
    .areas-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    #areas {
        padding: 2.5rem 0;
    }
    
    .areas-card {
        min-height: auto;
        margin: 0.5rem 0;
    }
    
    .areas-title {
        font-size: 1.2rem;
    }
    
    .areas-subtitle {
        font-size: 1rem;
    }
}
/* ======================================== Parte del equipo ======================================== */
#parte-equipo {
    background: linear-gradient(135deg, #f0f8ff 0%, #f8f9fa 100%);
    padding: 2rem 0 3rem;
    position: relative;
    overflow: hidden;
}

#parte-equipo .container-fluid {
    transform: translateX(-1.5cm); /* Desplazamiento principal */
    position: relative;
    overflow-x: hidden;
    padding-right: 1.5cm; /* Compensación para evitar cortes */
}

#parte-equipo .row {
    position: relative;
    z-index: 2;
    min-height: 160px;
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100% - 1.5cm); /* Ajuste de ancho compensatorio */
    justify-content: center !important;
}

#parte-equipo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;
    color: #2A4D6E;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    padding: 1rem 0;
    margin: 0;
    animation: titleEntrance 0.6s ease-out;
    text-align: center !important;
}

#parte-equipo h2 strong {
    display: inline-block;
    background: linear-gradient(135deg, #2A4D6E 0%, #71B3C3 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: transform 0.2s ease;
}

#parte-equipo h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #71B3C3;
    border-radius: 2px;
}

#parte-equipo .col-md-3 img {
    width: 100%;
    max-width: 180px;
    position: absolute;
    right: 1.5cm; /* Compensación de posición */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    animation: lineFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.03));
}

@keyframes titleEntrance {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lineFloat {
    0% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-51%) rotate(0.5deg); }
    100% { transform: translateY(-50%) rotate(0deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    #parte-equipo h2 { font-size: 1.6rem; }
    #parte-equipo .container-fluid {
        transform: translateX(-1.2cm);
        padding-right: 1.2cm;
    }
    #parte-equipo .row {
        max-width: calc(100% - 1.2cm);
    }
}

@media (max-width: 992px) {
    #parte-equipo { padding: 4rem 0 2rem; }
    #parte-equipo h2 { font-size: 1.4rem; }
    #parte-equipo .col-md-3 img { max-width: 140px; }
    #parte-equipo .container-fluid {
        transform: translateX(-0.8cm);
        padding-right: 0.8cm;
    }
    #parte-equipo .row {
        max-width: calc(100% - 0.8cm);
    }
}

@media (max-width: 768px) {
    #parte-equipo { padding: 3rem 0 1.5rem; }
    #parte-equipo h2 { 
        font-size: 1.3rem;
        line-height: 1.2;
        padding: 0.5rem 0; 
    }
    #parte-equipo h2::after { width: 80px; }
    #parte-equipo .container-fluid {
        transform: translateX(-0.5cm);
        padding-right: 0.5cm;
    }
    #parte-equipo .row {
        max-width: calc(100% - 0.5cm);
    }
}

@media (max-width: 576px) {
    #parte-equipo { padding: 2rem 0 1rem; }
    #parte-equipo h2 { 
        font-size: 1.1rem;
        line-height: 1.15;
    }
    #parte-equipo .col-md-3 img { max-width: 100px; }
    #parte-equipo .container-fluid {
        transform: translateX(-0.3cm);
        padding-right: 0.3cm;
    }
    #parte-equipo .row {
        max-width: calc(100% - 0.3cm);
    }
}

/* ======================================== Contacto ======================================== */
#contacto-comunidad {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

#contacto-comunidad .container-fluid {
    position: relative;
    z-index: 2;
}

#contacto-comunidad .col-md-8 {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(33, 150, 243, 0.1);
    transform: translateY(20px);
    animation: formEntrance 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

#contacto-comunidad h5 {
    font-size: 1.8rem;
    color: #0d47a1;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-left: 2rem;
}

#contacto-comunidad h5::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 80%;
    background: #2196F3;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

#contacto-comunidad p {
    color: #546e7a;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    color: #1e88e5;
    font-weight: 600;
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.form-group label::before {
    content: '•';
    position: absolute;
    left: -5px;
    color: #2196F3;
    font-size: 1.4em;
    top: -2px;
}

.form-control {
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.form-control:focus {
    border-color: #2196F3;
    box-shadow: 0 0 25px rgba(33, 150, 243, 0.15);
    background: #fff;
    transform: translateY(-2px);
}

#btn-contacto-comunidad {
    background: linear-gradient(135deg, #2196F3 0%, #42a5f5 100%);
    border: none;
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

#btn-contacto-comunidad::after {
    content: '→';
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

#btn-contacto-comunidad::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.15) 50%, transparent 75%);
    transform: translateX(-100%) rotate(45deg);
    animation: btnShine 4s infinite;
}

#btn-contacto-comunidad:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(33, 150, 243, 0.3);
}

#btn-contacto-comunidad:hover::after {
    transform: translateX(5px);
}

@keyframes btnShine {
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

#contacto-comunidad .col-md img {
    width: 250px;
    position: absolute;
    right: -50px;
    bottom: -80px;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 15px 25px rgba(33, 150, 243, 0.1));
}

@keyframes formEntrance {
    to {
        transform: translateY(0);
        opacity: 1;
    }
    from {
        transform: translateY(30px);
        opacity: 0;
    }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-30px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(2deg); }
}

@media (max-width: 992px) {
    #contacto-comunidad .col-md-8 {
        padding: 2.5rem;
        margin: 0 1rem;
    }
    
    #contacto-comunidad h5 {
        font-size: 1.6rem;
    }
    
    #contacto-comunidad .col-md img {
        right: -80px;
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    #contacto-comunidad {
        padding: 4rem 0;
    }
    
    #contacto-comunidad .col-md-8 {
        padding: 2rem;
    }
    
    #btn-contacto-comunidad {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    #contacto-comunidad .col-md img {
        display: none;
    }
}

@media (max-width: 576px) {
    #contacto-comunidad .col-md-8 {
        padding: 1.5rem;
    }
    
    #contacto-comunidad h5 {
        font-size: 1.4rem;
        padding-left: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    #btn-contacto-comunidad {
        width: 100%;
        justify-content: center;
    }
}