/* ===================================================
   CSS PARA POSTULACIÓN DE PONENCIAS - EDUTIC 2026
   VERSIÓN FINAL - SIN OVERFLOW + TEXTOS OPTIMIZADOS
   ================================================== */

/* ===================================================
   FIX GLOBAL - PREVENIR OVERFLOW HORIZONTAL
   ================================================== */

/* ===================================================
   HERO BANNER - TAMAÑOS REDUCIDOS PARA MÓVIL
   ================================================== */

.hero-ponencias {
    background: linear-gradient(135deg, var(--edutic-blue) 0%, #4a6fd6 50%, var(--edutic-dark) 100%);
    min-height: 180px;
    padding: 75px 0 30px;
    position: relative;
    overflow-x: hidden;  /* Solo bloquear horizontal */
    overflow-y: visible; /* Permitir vertical */
    width: 100%;
}

.hero-ponencias::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    z-index: 1;
}

/* Elementos decorativos controlados - no causan overflow */
.hero-ponencias::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 193, 7, 0.08);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.hero-ponencias .geo-shape-left {
    position: absolute;
    bottom: -35px;
    left: -35px;
    width: 120px;
    height: 120px;
    background: rgba(29, 53, 87, 0.15);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(-25deg);
    z-index: 1;
}

.hero-ponencias .geo-dots {
    display: none;
}

.hero-ponencias .container {
    position: relative;
    z-index: 2;
    padding-left: 15px;
    padding-right: 15px;
}

/* TEXTOS DEL HEADER REDUCIDOS */
.hero-ponencias h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.35;
    padding: 0;
}

.hero-ponencias .lead {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.5;
    padding: 0;
}

.badge-ponencias {
    background: rgba(255, 193, 7, 0.2);
    border: 2px solid rgba(255, 193, 7, 0.4);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.85rem;
}

/* ===================================================
   SECCIÓN DE TEMÁTICAS
   ================================================== */

.tematicas-section {
    background: #f8f9fa;
    padding: 1.5rem 0;
    margin-top: -20px;
    position: relative;
    z-index: 3;
    width: 100%;
        overflow-x: hidden;
    overflow-y: visible;
}

/* FORZAR 1 COLUMNA EN MÓVIL */
.tematicas-section .container {
    padding-left: 15px;
    padding-right: 15px;
}

.tematicas-section .row {
    margin-left: -10px;
    margin-right: -10px;
}

.tematicas-section .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

.tematica-card {
    background: white;
    border-radius: 14px;
    padding: 1.15rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    height: auto;
    cursor: pointer;
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tematica-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(95, 131, 232, 0.2);
    border-color: var(--edutic-blue);
}

.tematica-card.selected {
    border-color: var(--edutic-orange);
    background: linear-gradient(135deg, rgba(220, 71, 17, 0.03) 0%, white 100%);
    box-shadow: 0 6px 22px rgba(220, 71, 17, 0.15);
}

.tematica-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--edutic-blue), #4a6fd6);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 0.7rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tematica-card:hover .tematica-icon {
    transform: scale(1.06) rotate(2deg);
}

.tematica-card.selected .tematica-icon {
    background: linear-gradient(135deg, var(--edutic-orange), #e8551a);
}

.tematica-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--edutic-dark);
    margin-bottom: 0.45rem;
    line-height: 1.4;
}

.tematica-card p {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0.7rem;
    flex-grow: 1;
}

.vermas-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--edutic-dark);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 18px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

/* ===================================================
   FORMULARIO
   ================================================== */

.formulario-ponencias {
    padding: 1.75rem 0;
    background: white;
    width: 100%;
        overflow-x: hidden;
    overflow-y: visible;
}

.formulario-ponencias .container {
    padding-left: 15px;
    padding-right: 15px;
}

.formulario-ponencias #msg-tema {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 2px solid var(--edutic-yellow);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.formulario-ponencias #msg-tema i {
    font-size: 1.4rem;
    color: var(--edutic-yellow);
    flex-shrink: 0;
}

.formulario-ponencias .form-group {
    margin-bottom: 1.3rem !important;
}

.formulario-ponencias .col-form-label {
    font-weight: 600;
    color: var(--edutic-dark);
    font-size: 0.85rem;
    padding-top: 0;
    padding-right: 0;
    margin-bottom: 0.4rem;
    text-align: left !important;
}

.formulario-ponencias .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 16px !important;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
}


.formulario-ponencias .form-control::placeholder {
    color: #858a8f;
    font-size: 0.85rem;
}

.formulario-ponencias textarea.form-control {
    min-height: 105px;
    resize: vertical;
}

.formulario-ponencias select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235F83E8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 10px;
    padding-right: 2.5rem;
    cursor: pointer;
    appearance: none;
}

.formulario-ponencias .form-text {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.35rem;
    display: block;
    line-height: 1.5;
}

.formulario-ponencias .form-text::before {
    content: '💡 ';
}

.formulario-ponencias .limitchar {
    font-weight: 600;
    color: var(--edutic-blue);
}


/* ===================================================
   BOTÓN DE ENVÍO
   ================================================== */

.formulario-ponencias .btnenviar {
    background: linear-gradient(135deg, var(--edutic-orange), #e8551a);
    border: none;
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(220, 71, 17, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 46px;
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.formulario-ponencias .btnenviar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.formulario-ponencias .btnenviar:hover::before {
    width: 280px;
    height: 280px;
}

.formulario-ponencias .btnenviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 25px rgba(220, 71, 17, 0.4);
}

.formulario-ponencias .btnenviar:active {
    transform: translateY(0);
}

.formulario-ponencias .btnenviar:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* ===================================================
   VALIDACIONES
   ================================================== */

.formulario-ponencias .form-control.is-invalid {
    border-color: var(--edutic-orange);
    background: #fff8f8;
}

.formulario-ponencias .cferror {
    display: block;
    color: var(--edutic-orange);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.35rem;
    padding-left: 0.25rem;
}

.formulario-ponencias .form-control.is-valid {
    border-color: var(--edutic-green);
    background: #f8fff8;
}

.formulario-ponencias .valid-feedback {
    display: block;
    color: var(--edutic-green);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

/* ===================================================
   SECCIÓN ORGANIZADOR
   ================================================== */

.formulario-ponencias .org_rep {
    background: white;
    border-radius: 14px;
    padding: 1.4rem 0.95rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
}

/* ===================================================
   SELECTPICKER
   ================================================== */

.formulario-ponencias .bootstrap-select .dropdown-toggle {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    background: #fafbfc;
    font-size: 16px !important;
}

.formulario-ponencias .bootstrap-select .dropdown-toggle:focus {
    border-color: var(--edutic-blue);
    background: white;
    box-shadow: 0 0 0 0.15rem rgba(95, 131, 232, 0.12);
}

/* ===================================================
   RESPONSIVE - MÓVIL GRANDE (> 420px)
   ================================================== */

@media (min-width: 420px) {
    .hero-ponencias h1 {
        font-size: 1.45rem;
    }

    .hero-ponencias .lead {
        font-size: 0.85rem;
    }

    .tematica-card h3 {
        font-size: 0.95rem;
    }

    .tematica-card p {
        font-size: 0.8rem;
    }
}

/* ===================================================
   RESPONSIVE - TABLETS PEQUEÑAS (> 576px)
   ================================================== */

@media (min-width: 576px) {
    .hero-ponencias {
        min-height: 200px;
        padding: 85px 0 35px;
    }

    .hero-ponencias h1 {
        font-size: 1.6rem;
    }

    .hero-ponencias .lead {
        font-size: 0.9rem;
    }

    .badge-ponencias {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .hero-ponencias::after {
        width: 170px;
        height: 170px;
        top: -55px;
        right: -55px;
    }

    .tematica-card {
        padding: 1.25rem;
    }

    .tematica-card h3 {
        font-size: 1rem;
    }

    .tematica-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .formulario-ponencias .btnenviar {
        max-width: 360px;
    }
}

/* ===================================================
   RESPONSIVE - TABLETS (> 768px)
   ================================================== */

@media (min-width: 768px) {
    /* PERMITIR 2 COLUMNAS */
    .tematicas-section .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .hero-ponencias {
        min-height: 230px;
        padding: 95px 0 40px;
    }

    .hero-ponencias h1 {
        font-size: 1.8rem;
    }

    .hero-ponencias .lead {
        font-size: 0.95rem;
    }

    .hero-ponencias::after {
        width: 200px;
        height: 200px;
        top: -60px;
        right: -60px;
    }

    .hero-ponencias .geo-shape-left {
        width: 150px;
        height: 150px;
        bottom: -40px;
        left: -40px;
    }

    .tematica-card {
        padding: 1.4rem 1.2rem;
    }

    .tematica-card h3 {
        font-size: 1.05rem;
    }

    .tematica-icon {
        width: 50px;
        height: 50px;
        font-size: 1.45rem;
    }

    .formulario-ponencias {
        padding: 2rem 0;
    }

    .formulario-ponencias .col-form-label {
        font-size: 0.9rem;
    }

    .formulario-ponencias .form-control {
        padding: 0.7rem 1rem;
    }

    .formulario-ponencias .btnenviar {
        width: auto;
        padding: 0.85rem 2.25rem;
        font-size: 0.95rem;
    }

    .formulario-ponencias .org_rep {
        padding: 1.65rem 1.2rem;
    }

    .formulario-ponencias #msg-tema {
        flex-direction: row;
        text-align: left;
        padding: 0.95rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* ===================================================
   RESPONSIVE - DESKTOP PEQUEÑO (> 992px)
   ================================================== */

@media (min-width: 992px) {
    /* PERMITIR 3-4 COLUMNAS */
    .tematicas-section .row > [class*="col-"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .hero-ponencias {
        min-height: 270px;
        padding: 115px 0 55px;
    }

    .hero-ponencias h1 {
        font-size: 2.2rem;
    }

    .hero-ponencias .lead {
        font-size: 1.05rem;
    }

    .badge-ponencias {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    .hero-ponencias::after {
        width: 280px;
        height: 280px;
        top: -75px;
        right: -75px;
    }

    .hero-ponencias .geo-dots {
        display: grid;
    }

    .tematicas-section {
        padding: 2.25rem 0;
        margin-top: -30px;
    }

    .tematica-card {
        padding: 1.6rem 1.4rem;
    }

    .tematica-card h3 {
        font-size: 1.1rem;
    }

    .tematica-icon {
        width: 54px;
        height: 54px;
        font-size: 1.6rem;
    }

    .formulario-ponencias {
        padding: 2.5rem 0;
    }

    .formulario-ponencias .col-form-label {
        font-size: 0.95rem;
        padding-top: 0.5rem;
    }

    .formulario-ponencias .form-control {
        padding: 0.75rem 1.15rem;
    }

    .formulario-ponencias .org_rep {
        padding: 2rem 1.5rem;
    }
}

/* ===================================================
   RESPONSIVE - DESKTOP GRANDE (> 1200px)
   ================================================== */

@media (min-width: 1200px) {
    .tematicas-section .row > [class*="col-md-3"] {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .hero-ponencias {
        min-height: 310px;
        padding: 135px 0 75px;
    }

    .hero-ponencias h1 {
        font-size: 2.6rem;
    }

    .hero-ponencias .lead {
        font-size: 1.15rem;
    }

    .hero-ponencias::after {
        width: 380px;
        height: 380px;
        top: -95px;
        right: -95px;
    }

    .hero-ponencias .geo-shape-left {
        width: 230px;
        height: 230px;
        bottom: -75px;
        left: -75px;
    }

    .tematica-icon {
        width: 58px;
        height: 58px;
        font-size: 1.75rem;
    }

    .formulario-ponencias {
        padding: 3rem 0;
    }

    .formulario-ponencias .org_rep {
        padding: 2.35rem 1.85rem;
    }

    .formulario-ponencias .btnenviar {
        padding: 0.95rem 2.75rem;
        font-size: 1.05rem;
    }
}

/* ===================================================
   ANIMACIONES
   ================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tematica-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.tematica-card:nth-child(1) { animation-delay: 0.05s; }
.tematica-card:nth-child(2) { animation-delay: 0.1s; }
.tematica-card:nth-child(3) { animation-delay: 0.15s; }
.tematica-card:nth-child(4) { animation-delay: 0.2s; }

.hero-ponencias::after,
.hero-ponencias .geo-shape-left {
    animation: floatGeometry 6s ease-in-out infinite;
}

@keyframes floatGeometry {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

/* ===================================================
   ESTADOS DE CARGA
   ================================================== */

.formulario-ponencias .btnenviar.loading {
    pointer-events: none;
    opacity: 0.7;
}

.formulario-ponencias .btnenviar.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================================
   ACCESIBILIDAD
   ================================================== */

.formulario-ponencias .form-control:focus-visible {
    outline: 2px solid var(--edutic-blue);
    outline-offset: 2px;
}

.formulario-ponencias .btnenviar:focus-visible {
    outline: 3px solid var(--edutic-yellow);
    outline-offset: 3px;
}

.tematica-card:focus-visible {
    outline: 3px solid var(--edutic-blue);
    outline-offset: 3px;
}

/* ===================================================
   UTILIDADES
   ================================================== */

.formulario-ponencias .required::after {
    content: ' *';
    color: var(--edutic-orange);
    font-weight: 700;
}

.formulario-ponencias .text-muted {
    color: #6c757d !important;
}

.formulario-ponencias .d-none {
    display: none !important;
}

.formulario-ponencias .form-group.mb-0 {
    margin-bottom: 0 !important;
}

.formulario-ponencias .justify-content-center {
    justify-content: center !important;
}

/* ===================================================
   FIX ADICIONAL - PREVENIR ELEMENTOS QUE SE SALEN
   ================================================== */

.hero-ponencias,
.tematicas-section,
.formulario-ponencias {
    max-width: 100vw;
    position: relative;
}


.choices .is-invalid {
  border: 1px solid #dc3545 !important;
}

.choices .is-invalid::after {
  position: absolute;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #dc3545;
  font-size: 20px;
  right: 40px;
}
