@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
    --primary-green: #10b981;
    --light-green: #d1fae5;
    --soft-green: #a7f3d0;
    --mint-green: #6ee7b7;
    --sage-green: #34d399;
    --forest-green: #059669;
    --dark-green: #047857;
    --colortitle: #1f2937;
    --radius: 0.75rem;
    --gap: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
    color: var(--colortitle);
    line-height: 1.6;
}

.text-section-container {
    text-align: center;
}

.text-left-aligned {
    text-align: left;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--forest-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.pulse-green {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.1);
}

.admin-gradient {
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #4b5563 100%);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.grid-profesionales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-items: center;
    text-align: center;
    gap: 2rem;
    /*padding: 0 1rem 4rem;*/
    margin: 0 auto;
    max-width: 1200px;
}

.prof-card {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 380px;
    /* 👈 antes estaba en 380px */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: #b9e192 1px solid;
    padding: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.9s ease-out, box-shadow 0.3s ease;
}

.prof-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.prof-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.prof-card div {
    flex: 1;
    padding: 0 2rem;
}

.prof-card .fotos-prof {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--gap);
}

.nombre-profesional {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--colortitle);
    padding-top: 0;
    margin: 1px;
}

.especialidad {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    color: var(--colortitle);
}

.matricula {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    color: var(--colortitle);
    font-weight: 200;
}


/******* iconos en footer *******************************/

.btn .btn-light-green {
    color: var(--sage-green);
}


/* ─── UBICACIÓN & REDES ─── */

.map-wrapper {
    margin-bottom: 3rem;
    /* espacio entre mapa y título/redes */
    border-radius: var(--radius);
}

.map-wrapper iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: var(--radius);
}


/* Contenedor de iconos sociales */


/* Contenedor de iconos sociales */

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    /* espacio entre iconos */
    margin-bottom: 4rem;
    flex-wrap: wrap;
    /* que bajen en móviles si no caben */
}


/* Iconos por defecto */

.social-icons img {
    width: 82px;
    height: 82px;
    transition: transform 0.3s ease, filter 0.3s ease;
    /* animación suave */
    cursor: pointer;
}


/* Efecto hover */

.social-icons img:hover {
    transform: scale(1.2);
    /* crece un poco */
    filter: brightness(1.1);
    /* opcional: más brillante al pasar el mouse */
}


/* Responsive: pantallas pequeñas */

@media (max-width: 768px) {
    .social-icons {
        margin-top: 3rem;
        padding-top: 3rem;
    }
    .map-wrapper iframe {
        height: 250px;
    }
    .social-icons img {
        width: 70px;
        height: 70px;
    }
    .social-icons {
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .social-icons img {
        width: 60px;
        height: 60px;
    }
    .social-icons {
        gap: 1.5rem;
    }
    .map-wrapper iframe {
        height: 200px;
    }
}


/************************* fromularios y modals ***********************************/


/********************************estilos modal yform *******************************************/


/* ✂ Base: ocultar overlay y modal por defecto */

.custom-modal-overlay,
.custom-modal {
    display: none;
}


/* ✂ Mostrar overlay cuando tenga .open */

.custom-modal-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 15;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}


/* ✂ Mostrar modal cuando tenga .open */

.custom-modal.open {
    display: block;
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(57, 245, 135, 0.1);
    z-index: 20;
    text-align: center;
}

.alert-flotante {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    background-color: #d1fae5;
    /* verde pastel */
    color: #065f46;
    border: 1px solid #10b981;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


/* ─── ESTILO WIRE-FRAME PARA EL MODAL ─── */

.custom-modal {
    display: none;
    /* sigue oculto hasta que JS le ponga .open */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 20;
    text-align: center;
    overflow-y: auto;
    /* permite hacer scroll si hay muchos campos */
    padding: 1.5rem 1rem;
    /**********************************************************/
    /* ancho máximo para desktop */
    max-height: 90vh;
}


/* overlay semitransparente */

.custom-modal-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 15;
}


/* Cabecera del modal */

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.70rem;
    margin-bottom: 1rem;
    flex-direction: column;
}

.custom-modal-header img {
    width: 60px;
    height: auto;
}

.custom-modal-header span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}


/* Botón de cerrar (X) */

.custom-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #666;
}


/* Títulos y márgenes */

.custom-modal h2 {
    margin: 0;
    /* ya lo cubre .modal-header */
}

.custom-modal form {
    margin-top: 0.5rem;
}


/* Inputs y labels (igual que antes, pero centrados) */

.field-group {
    position: relative;
    margin: 1.25rem 0;
}

.field-group input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #71ff6c;
    padding: 0.5rem 0;
    /*background: transparent;*/
    outline: none;
    transition: border-color .3s;
}

.field-group label {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0 .25rem;
    transition: .2s ease all;
    color: #999;
    pointer-events: none;
}

.field-group input:focus {
    border-color: green;
}

.field-group input:focus+label,
.field-group input:not(:placeholder-shown)+label {
    top: -1rem;
    font-size: .85rem;
    color: var(--primary-green);
}


/* Fieldset */

form fieldset {
    border: none;
    margin: 1rem 0;
    text-align: left;
}

form fieldset legend {
    font-weight: 300;
    margin-bottom: .5rem;
    font-size: 16px;
}

form fieldset label {
    display: block;
    margin: .25rem 0;
    cursor: pointer;
}


/* Botón enviar */

.submit {
    position: relative;
    overflow: hidden;
    padding: .75rem 1.5rem;
    background: rgb(90, 185, 119);
    color: white;
    border: 3px solid var(--primary-color);
    border-radius: .5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background .3s, color .3s;
    margin-top: 1rem;
    max-width: 500rem;
}

.submit:hover {
    background: var(--sage-green);
    color: #fff;
}


/* Ocultar tilde al inicio */

.checkmark,
.checkmark2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    pointer-events: none;
    font-size: 1.05rem;
}

.checkmark {
    color: rgb(77, 190, 73);
}

.checkmark2 {
    color: rgb(255, 66, 66);
    /* rojo */
    font-size: 1.5rem;
}


/* Mostrar tilde */

.submit.click .checkmark {
    transform: translate(-50%, -50%) scale(2);
}


/* Ocultar texto */

.submit.click .btn-text,
.submit.error .btn-text {
    opacity: 0;
}


/* Mostrar cruz roja cuando hay error */

.submit.error .checkmark2 {
    transform: translate(-50%, -50%) scale(1);
}


/* Ocultar texto cuando hay animación */

.submit.click .btn-text,
.submit.error .btn-text {
    opacity: 0;
}

.error-msg {
    color: red;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
    text-align: center;
}

.error-msg.show {
    display: block;
}

input.oculto {
    display: none;
}

#olvidastepass {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    margin-bottom: 3rem;
    text-decoration: none;
}


/******************************************/

@media (max-width: 600px) {
    .custom-modal {
        width: 95%;
        max-width: none;
        height: 90vh;
        /* ocupa 90% del alto visible */
        overflow-y: auto;
        /* permite hacer scroll si hay muchos campos */
        padding: 1.5rem 1rem;
    }
    .custom-modal-header img {
        width: 50px;
    }
    .custom-modal-header span {
        font-size: 1.2rem;
    }
    .submit {
        width: 100%;
    }
    fieldset.opciones label {
        font-size: 0.9rem;
    }
}


/************estilos del boton de whatsapp********/

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    /* distancia desde abajo */
    right: 20px;
    /* distancia desde el borde derecho */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform .2s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp {
    max-width: 55px;
}


/* Centrar los items de hogares en celular */

@media (max-width: 576px) {
    .portfolio-item {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .portfolio-item img {
        display: block;
        margin: 0 auto;
        /* centra la imagen */
    }
    .portfolio-caption {
        text-align: center;
        /* centra los textos */
    }
    li {
        font-size: small;
    }
}