/* style.css */

/* --- Variables CSS (opcional, pero buena práctica) --- */
:root {
    --primary-color: #1a237e; /* Azul oscuro elegante (Deep Indigo) */
    --secondary-color: #3f51b5; /* Azul medio para acentos (Indigo) */
    --accent-color: #00bcd4; /* Azul turquesa para botones/interactividad (Cyan) */
    --text-color: #333;
    --light-text-color: #666;
    --background-light: #f4f7f6; /* Blanco roto / gris muy claro */
    --background-dark: #263238; /* Gris oscuro para footer (Blue Grey Dark) */
    --border-color: #e0e0e0;
    --box-shadow-light: 0 4px 8px rgba(0, 0, 0, 0.05);
    --transition-speed: 0.3s ease;
}

/* Importar una fuente de Google Fonts (ejemplo: Open Sans) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/* --- Estilos Generales y Resets --- */
body {
    font-family: 'Open Sans', sans-serif; /* Fuente moderna y legible */
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-light);
    margin-top: 70px; /* Espacio para la navbar fija */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px; /* Un poco más ancho para más contenido */
    padding-left: 15px;
    padding-right: 15px;
}

/* --- Títulos y Párrafos --- */
h2 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 25px;
    font-weight: 700; /* Más audaz */
    font-size: 2.2em; /* Tamaño más prominente */
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

h2 .fa {
    margin-right: 10px;
    color: var(--accent-color);
}

p {
    font-size: 1.05em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.intro-text {
    font-size: 1.15em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--light-text-color);
}

.feature-text {
    font-size: 1.1em !important; /* Usamos important para asegurar que sobrescribe estilos en línea */
    line-height: 1.7;
    background-color: #ffffff;
    padding: 20px;
    border-left: 5px solid var(--secondary-color);
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-radius: 4px;
}

.feature-text .fa {
    margin-right: 12px;
    color: var(--accent-color);
    font-size: 1.3em;
}

/* --- Navbar (Barra de Navegación) --- */
.navbar-default {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px 0; /* Más espacio vertical */
    min-height: 60px; /* Altura mínima para la navbar */
}

.navbar-fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-brand {
    padding: 5px 15px; /* Ajuste para el logo */
    height: 60px; /* Altura de la barra */
    display: flex;
    align-items: center;
}

.navbar-brand img {
    margin-top: 0 !important; /* Anulamos el margin-top del HTML */
    height: 45px; /* Ajustamos la altura del logo */
    width: auto;
}

.navbar-nav > li > a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.05em;
    padding-top: 20px;
    padding-bottom: 20px;
    transition: color var(--transition-speed), background-color var(--transition-speed);
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    color: var(--secondary-color);
    background-color: transparent;
}

.navbar-nav > .dropdown > a .caret {
    border-top-color: var(--text-color);
    border-bottom-color: var(--text-color);
}

.navbar-nav > .dropdown > a:hover .caret,
.navbar-nav > .dropdown > a:focus .caret {
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 5px 0;
}

.dropdown-menu > li > a {
    padding: 10px 20px;
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: var(--primary-color);
    color: #fff;
}

.navbar-toggle {
    margin-top: 13px; /* Centra el botón de hamburguesa */
    border-color: var(--border-color);
}

.navbar-toggle .icon-bar {
    background-color: var(--text-color);
}

/* --- Jumbotron (Formulario de Chat) --- */
.jumbotron {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--box-shadow-light);
    text-align: center;
    border: none; /* Quitamos el borde predeterminado */
    transition: box-shadow var(--transition-speed);
}

.jumbotron:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.jumbotron .input-group {
    max-width: 500px;
    margin: 0 auto;
}

.jumbotron .form-control {
    height: 50px;
    font-size: 1.1em;
    border-radius: 5px 0 0 5px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.jumbotron .input-group-addon {
    background-color: var(--secondary-color);
    color: #fff;
    border: 1px solid var(--secondary-color);
    font-size: 1.3em;
    padding: 12px 18px;
    border-radius: 0; /* Aseguramos que no tenga borde redondeado */
}

/* Estilo para el span del texto "Chatear" dentro del botón */
.jumbotron .btn-primary span {
    display: inline !important; /* FUERZA la visibilidad del texto */
    padding-left: 8px; /* Espacio entre el ícono y el texto */
}

.jumbotron .btn-primary { /* Cambiamos a btn-primary para un look más consistente con el azul */
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-size: 1.em;
    padding: 12px 25px;
    border-radius: 0 5px 5px 0;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
    white-space: nowrap; /* Asegura que el texto "Chatear" no se rompa en varias líneas */
    min-width: 120px; /* Ancho mínimo para que el texto siempre quepa */
}

.jumbotron .btn-primary:hover,
.jumbotron .btn-primary:focus {
    background-color: #00a4b8; /* Tono más oscuro al hover */
    border-color: #00a4b8;
}

/* --- Salas por Categorías (Tags) --- */
.tag-list {
    margin-bottom: 20px;
}

.tag-list a {
    display: inline-block;
    margin: 5px 8px 5px 0;
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.95em;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    white-space: nowrap; /* Evita que el texto se rompa */
}

.tag-list a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px); /* Pequeña elevación */
}

/* --- Thumbnails de Salas --- */
.chat-thumbnails .thumbnail {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow-light);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 25px; /* Espacio entre filas */
}

.chat-thumbnails .thumbnail:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.chat-thumbnails .thumbnail img {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: brightness(0.95); /* Ligeramente más oscuro */
    transition: filter var(--transition-speed);
}

.chat-thumbnails .thumbnail:hover img {
    filter: brightness(1); /* Vuelve a la normalidad al pasar el ratón */
}

.chat-thumbnails .thumbnail .caption {
    padding: 15px;
    background-color: #ffffff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.chat-thumbnails .thumbnail .caption h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.chat-thumbnails .thumbnail .caption h4 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    transition: color var(--transition-speed);
}

.chat-thumbnails .thumbnail .caption h4 a:hover {
    color: var(--accent-color);
}

.chat-thumbnails .thumbnail .caption p {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 0;
}

/* --- Líneas Horizontales (HR) --- */
hr {
    border-top: 1px solid var(--border-color);
    margin: 40px 0;
}

/* --- Pie de Página (Footer) --- */
#footer {
    background-color: var(--background-dark);
    color: #fff;
    padding: 30px 0;
    margin-top: 50px;
    font-size: 0.9em;
    text-align: center;
}

#footer p {
    margin-bottom: 0;
    color: #e0e0e0;
}

#footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: color var(--transition-speed);
}

#footer a:hover {
    color: var(--accent-color);
}

/* --- Ajustes para Responsive --- */
@media (max-width: 767px) {
    body {
        margin-top: 0; /* En móviles, la navbar no siempre es fija */
    }

    .navbar-fixed-top {
        position: static; /* Deshabilita fixed-top en móviles para algunos diseños */
    }

    h2 {
        font-size: 1.8em;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .jumbotron {
        padding: 25px;
    }

    /* Ajustes específicos para el input-group en móviles */
    .jumbotron .input-group {
        display: block; /* Hace que el input-group se comporte como un bloque */
        width: 100%;
    }
    
    .jumbotron .input-group .form-control {
        border-radius: 5px; /* Redondea completo el input */
        margin-bottom: 10px; /* Espacio debajo del input */
        width: 100% !important; /* Asegura que ocupe todo el ancho */
    }

    .jumbotron .input-group-addon {
        display: block; /* El ícono se muestra en su propia línea */
        width: 100%;
        border-radius: 5px 5px 0 0; /* Solo arriba redondeado para el addon */
        margin-bottom: -1px; /* Para que se vea pegado al botón */
        text-align: center; /* Centrar el icono */
    }

    .jumbotron .input-group-btn {
        display: block; /* El botón se muestra en su propia línea */
        width: 100%;
    }
    
    .jumbotron .btn-primary {
        border-radius: 0 0 5px 5px; /* Redondea solo la parte inferior del botón */
        width: 100%; /* El botón ocupa todo el ancho */
        min-width: auto; /* Permite que el ancho se ajuste */
    }

    .chat-thumbnails .thumbnail .caption p.hidden-xs {
        display: none !important;
    }

    #footer .col-md-6 {
        text-align: center !important;
        margin-bottom: 10px;
    }
}