* {
    font-family: "Montserrat", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f5f5f5;
    color: #333;
    overflow-x: hidden;
    width: 100%;
}

main {
    margin: 5px;
    padding: 5px;
}

.tip-container {
    position:relative;
    z-index: 1000;
}

.tip {
    position: fixed;
    top: 90px;
    right: 0;
    font-size: 18px;
    padding: 20px; 
    border-radius: 15px; 
    color: #222; 
    background-color: #fff; 
    border: solid #000 2px;
    animation: deslizarTabla 1.5s ease-in-out forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: scale(0.7);
}

.tip span {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 16px;
    cursor: pointer;
}

::selection {
    background: green;
    color: lightblue;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: lightblue;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background-color: lightgreen;
    border-radius: 10px;
}

/* ENCABEZADO HERO */
header {
    background: linear-gradient(135deg, #00bcd4, #0066ff);
    color: white;
    text-align: center;
    position: relative;
    text-align: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    border-bottom: 10px solid;
    border-image: linear-gradient(to right, lightgreen, blue) 1;
}

.header_inicio {
    background: linear-gradient(135deg, #00bcd4, #0066ff);
    color: white;
    text-align: center;
    position: relative;
    text-align: center;
    width: 100%;
    min-height: 60vh;
    min-height: 60svh;
    border-bottom: 10px solid;
    border-image: linear-gradient(to right, lightgreen, blue) 1;
}

header h1 {
    font-size: 4rem;
    margin: 0;
    letter-spacing: 1px;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.inicio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 90%;
    max-width: 600px;
}

#ideas {
    opacity: 0;
    transform: translateY(40px);
    animation: aparecer 1.5s forwards ease-out;
}

#intro {
    opacity: 0;
    transform: translateY(40px);
    animation: aparecer 1.5s forwards ease-out;
}


.section-light {
    background: #f4f6f8;
    border-radius: 20px;
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.box {
    background: white;
    width: 95%;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-weight: bold;
}

/* LOGO & NAV SUPERIOR DESKTOP */
.header_header {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    top: 20px;
    z-index: 1000;
}

.header_title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.header_title h1 {
    font-size: 1.5rem;
}

.header_title img {
    height: 40px;
    width: 40px;
    border-radius: 15px;
    box-shadow: 3px 4px 5px rgba(40, 120, 255, 1)
}

.box-inicio {
    display: flex;
    justify-content: center;
    align-items: center;
    border: solid #fff 1px;
    padding: 10px;
    margin: 5px;
    margin-bottom: 10px;
    border-radius: 15px;
    font-size: 12px;
    box-shadow: 0 0 4px #00000099;
    width: fit-content;
    font-weight: bold;
}

.box-inicio span {
    margin-left: 8px;
}

/* BOTÓN CON LÍNEA ANIMADA */
.btn {
    position: relative;
    padding: 10px;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 20px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: .4s ease;
}

.btn:hover::after {
    transform: translateX(-50%) scaleX(.8);
}

#title_h1 {
    animation: moverTexto 1s ease-in-out;
}

#title_p {
    animation: moverTexto 0.8s ease-in-out;
}

.ver_propuesta,
.btn_ver {
    animation: moverTexto 0.6s ease-in-out;
    margin-top: 15px;
}

#description_inicio {
    animation: moverTexto 1s ease-in-out
}

.a_title {
    color: #fff;
}

/* IMÁGENES */
img {
    height: 200px;
    width: 250px;
    object-fit: cover;
}

/* BOTONES */
.btn_ver {
    background: white;
    color: #0066ff;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: .3s;
}

/* SECCIONES */
section {
    width: 85%;
    max-width: 900px;
    margin: 50px auto;
    text-align: center;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: #0066ff;
}

/* CARDS */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    text-align: left;
    transition: .3s;
}

.card:hover {
    transform: translateY(-6px);
}

/* FOOTER */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 50px;
    width: 100%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    flex-wrap: wrap;
}

.footer-links {
    flex: 1;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.footer-links.left {
    justify-content: flex-start;
}

.footer-links.right {
    justify-content: flex-end;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.footer-brand {
    text-align: center;
    flex: 1;
}

.footer-brand p {
    margin: 5px 0 15px;
    font-size: 16px;
    font-weight: bold;
}

.social-icons a {
    margin: 0 8px;
    color: white;
    font-size: 18px;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding: 15px 10px;
    font-size: 13px;
}

.footer img {
    height: 200px;
    width: 200px;
}

/* BOTÓN ADMIN */
#admin-btn {
    padding: 10px;
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    border: 2px solid #000;
    background: #efbf00;
    color: #000;
    cursor: pointer;
}

/* INPUTS */
input {
    background: white;
    color: #0066ff;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: bold;
    transition: .3s;
    border: none;
    margin: 5px;
}

input:hover {
    box-shadow: 0 0 8px #00bcd4;
}

.login,
.register {
    display: flex;
    flex-direction: column;
    margin: 10px;
}

/* VIDEO */
#video {
    background: #000;
    width: 100%;
    color: #fff;
    height: 600px;
    padding: 10px;
    border-radius: 5px;
}

#video_title {
    margin: 15px;
    font-size: 25px;
}

#video_iframe {
    width: 90%;
    height: 90%;
    margin: 5px;
    border-radius: 5px;
}

/* CONTACTO */
#contact {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .6);
    animation: moverTexto .5s ease-in-out;
}

.contact {
    display: flex;
    flex-direction: column;
}

#contact p {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.05rem;
}

#contact form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#contact input,
#contact textarea {
    width: 100%;
    max-width: 650px;
    background: white;
    color: #0066ff;
    padding: 14px 20px;
    border-radius: 30px;
    border: solid 1px #000;
    font-size: 1rem;
    transition: .3s;
    outline: none;
}

#contact textarea {
    height: 140px;
    border-radius: 18px;
    resize: none;
}

#contact input:hover,
#contact textarea:hover,
#contact input:focus,
#contact textarea:focus {
    box-shadow: 0 0 10px #00bcd4;
}

#contact button {
    background: #0066ff;
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

#contact button:hover {
    background: #00bcd4;
    color: white;
    transform: translateY(-3px);
}

.map-container {
    margin: 7px;
    padding-left: 10px;
}

.contact {
    margin: 7px;
    padding-right: 10px;
}

/* =========================================
   PANEL DE COMENTARIOS
   ========================================= */

.comments-container {
    max-width: 800px;
    /* Un poco más ancho para dejar aire a las respuestas */
    margin: 30px auto;
    background: #ffffff;
    color: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
}

/* Inputs y formulario */
.comments-container input,
.comments-container textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #333;
    background: #fff;
    color: #222;
    outline: none;
    font-size: 15px;
}

.comments-container textarea {
    height: 95px;
    resize: none;
}

/* Botón principal */
#btn-comentar {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #0066ff;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
}

#btn-comentar:hover {
    background: #0044aa;
}

#btn-cancelar {
    background: #ccc !important;
    margin-top: 5px;
}

/* Lista de comentarios y Card */
.coment-card {
    background: #e0e0e0;
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #00e676;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    box-sizing: border-box;
}

/* Texto del comentario */
.coment-texto {
    font-size: 15px;
    line-height: 1.5;
    margin: 5px 0;
    word-wrap: break-word;
    /* Rompe palabras largas */
    overflow-wrap: break-word;
    color: #111;
    width: 100%;
}

.coment-card b {
    color: #00bcd4;
    font-size: 14px;
}

.coment-card small {
    opacity: 0.5;
    font-size: 11px;
    margin-left: 5px;
}

/* CONTENEDOR DE BOTONES (CORREGIDO) */
.coment-actions {
    display: flex;
    flex-wrap: wrap;
    /* Si no caben, bajan de línea en vez de tapar */
    gap: 6px;
    margin-top: 10px;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.coment-actions button {
    background: #fff;
    border: 1px solid #444;
    color: #000;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.coment-actions button:hover {
    background: #0066ff;
    border-color: #0066ff;
}

/* ESTILO PARA RESPUESTAS (NIDIFICACIÓN) */
.es-respuesta {
    margin-left: 20px;
    /* Indentación lateral */
    border-left: 3px solid #0066ff;
    /* Color diferente para respuestas */
    background: #ffffff;
    margin-top: 8px;
    padding: 10px 15px;
}

.separador {
    margin: 40px 0 20px;
    text-align: left;
    font-size: 1.4rem;
    color: #fff;
    border-bottom: 2px solid #0066ff;
    padding-bottom: 10px;
    display: block;
}

#admin_name {
    color: #fff;
    background: #0066ff;
    padding: 4px;
    font-size: 10px;
    border-radius: 5px;
}

/* NAV MENU RESPONSIVE */
.nav-menu {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 4px;
    background: white;
    border-radius: 4px;
    transition: .4s;
}

/* Links */
.menu-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.menu-links a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 1rem;
    transition: .3s;
}

.menu-links a:hover {
    opacity: .7;
}

/* 🔥 Responsive Menu */
@media(max-width:900px) {

    /* Ocultamos desktop menu */
    .header_header {
        display: none;
    }

    .header_title {
        display: none
    }

    /* Mostramos hamburguesa */
    .nav-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        position: absolute;
        top: 20px;
        left: 15px;
        z-index: 2000;
    }

    /* Botón hamburguesa minimal */
    .hamburger {
        display: flex;
        width: 30px;
        height: 22px;
        padding: 0;
        background: none;
        border-radius: 0;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        transition: 0.3s ease;
    }

    /* Líneas */
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: 0.3s ease;
    }

    .menu-links {
        display: flex;
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        height: 100vh;
        background: #0066ff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        list-style: none;
        transition: .4s;
    }

    .menu-links a {
        font-size: 1.4rem;
        text-align: center;
    }

    .menu-link span {
        margin-right: 5px;
    }

    .menu-open {
        left: 0 !important;
    }

    .header_title2 {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 1000;
    }

    .header_title2 h1 {
        font-size: 1.4rem;
    }

    .header_title2 img {
        height: 40px;
        width: 40px;
        border-radius: 15px;
        box-shadow: 3px 4px 5px rgba(40, 120, 255, 1)
    }
}

/* Animación hamburguesa */
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ====================== */
/* SECCIÓN SOSTENIBILIDAD */
/* ====================== */

.section-light {
    background-color: #f5f7fa;
    padding: 80px 20px;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}

.section-light h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
}

.section-light p {
    max-width: 900px;
    margin: 0 auto 20px auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
    text-align: justify;
}

.section-light strong {
    color: #111827;
    font-weight: 600;
}


/* ===================== */
/*     🔹 RESPONSIVE      */
/* ===================== */
@media (max-width:950px) {
    header h1 {
        font-size: 3.4rem;
    }

    header p {
        font-size: 1.05rem;
    }

    img {
        width: 200px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .tip {
        display: none;
    }

    .section-light {
        padding: 60px 15px;
    }

    .section-light h2 {
        font-size: 1.8rem;
    }

    .section-light p {
        font-size: 1rem;
        text-align: left;
    }
}

@media (max-width:700px) {
    header {
        padding: 60px 15px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    header p {
        font-size: 1rem;
    }

    #video {
        height: 450px;
    }

    .es-respuesta {
        margin-left: 10px;
        padding: 8px;
    }

    .comments-container {
        padding: 15px;
        margin: 10px;
    }

    .box-inicio {
        padding: 7px;
        margin: 4px;
        margin-bottom: 6px;
        font-size: 10px;
    }

    .box-inicio span {
        margin-left: 6px;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        padding: 30px 20px;
    }

    .footer-links,
    .footer-brand {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links.right {
        gap: 1rem;
    }

    .footer-brand {
        order: -1;
    }

    .footer-links h2,
    .footer-brand h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}

@media (max-width:480px) {
    header {
        padding: 45px 14px;
    }

    header h1 {
        font-size: 1.9rem;
    }

    header p {
        font-size: .9rem;
    }

    video {
        width: 100%;
        height: auto;
    }

    img {
        width: 150px;
        height: auto;
    }

    #video {
        height: auto;
        padding: 5px;
    }

    .header_title2 h1 {
        font-size: 1.2rem
    }

    .header_title2 img {
        height: 35px;
        width: 35px;
    }

    #contact {
        flex-direction: column;
        padding: 40px;
    }

    .footer img {
        height: 150px;
        width: 150px;
    }

    .ver_propuesta {
        padding: 6px 18px;
    }

    #title_p {
        font-size: 14px;
    }

    #description_inicio {
        font-size: 10px;
    }
}

@media (max-width:368px) {
    .ver_propuesta {
        padding: 4px 16px;
    }

    #title_p {
        font-size: 12px;
    }

    #description_inicio {
        font-size: 8px;
    }
}

/* ANIMACIONES */
@keyframes moverTexto {
    from {
        transform: translateX(-900px);
    }

    to {
        transform: translateX(0);
    }
}


@keyframes aparecer {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes deslizarTabla {
    0% {
        transform: translateX(100%) scale(0.7);
        opacity: 0;
    }
    60% {
        transform: translateX(-10px) scale(0.7);
        opacity: 1;
    }
    80% {
        transform: translateX(5px) scale(0.7);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(0.7);
        opacity: 1;
    }
}
