/* Montserrat font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

/* color palette and typography variables */
:root {
    --background-color: #F6F1EB;     /* Blanco roto */
    --primary-color: black;        /* color primario */
    --secondary-color: #141F33;      /* Color secundario */

    --text-color-default: #000000;   
    --text-color-headings: #000000;  
    --text-muted-color: #6c757d;     

    --font-family-main: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-family-main);
    background-color: var(--background-color);
    color: var(--text-color-default);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-main);
    color: var(--primary-color) !important; 
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

p {
    font-family: var(--font-family-main);    
    margin-bottom: 1em;
}

a {
    color: var(--secondary-color); /* color secundario para enlaces */
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: var(--primary-color); /* color primario para el hover */
    text-decoration: underline;
}

.text-muted {
    color: var(--text-muted-color) !important;
}

.text-success {
    color: var(--text-color-default) !important; 
    font-size: 18px !important;
}


/* Ajustes responsivos */
@media (max-width: 576px) { 
    .row > [class^="col"] { 
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Clases de utilidad */
.bg-primary {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important; 
}

.btn-primary{
 background-color: var(--primary-color) !important;   
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: #FFFFFF !important; 
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.header-desktop-wrapper {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
}

/* Top Bar */
.top-bar {
    background-color: #f8f9fa; 
    font-size: 0.85rem;
}
.top-bar-link {
    color: var(--text-color-default);
    text-decoration: none;
    padding: 0.25rem 0;
}
.top-bar-link:hover {
    color: var(--primary-color);
}

/* Main Header */
.main-header {
    background-color: #141F33; 
    border-bottom: 1px solid #dee2e6; 
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo-img-caasa {
    max-height: 40px; 
    width: auto;
}

.site-name-caasa {
    font-family: var(--font-family-main);
    font-size: 1.5rem; 
    font-weight: 700;
    color: var(--text-color-default); 
    margin-left: 0.5rem;
}
.logo-caasa-link:hover .site-name-caasa {
    color: var(--primary-color); 
}


/* Barra de Búsqueda */
.search-bar-caasa .form-control {
    border-right: none; 
    font-size: 0.9rem;
}
.search-bar-caasa .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}
.search-bar-caasa .form-select {
    border-left: 1px solid #ced4da; 
    font-size: 0.9rem;
}
.search-bar-caasa .form-select:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}
.search-bar-caasa .btn-caasa-primary { 
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}


/* Opciones de Usuario */
.icon-link-caasa {
    color: var(--text-color-default); 
    font-size: 1.25rem; 
    text-decoration: none;
}
.icon-link-caasa:hover {
    color: var(--primary-color);
}

.badge-caasa-count {
    font-size: 0.65em; 
    padding: 0.25em 0.4em; 
}

.btn-user-avatar-caasa {
    background-color: transparent;
    border: none;
    padding: 0;
    color: var(--text-color-default);
}
.btn-user-avatar-caasa:hover,
.btn-user-avatar-caasa:focus {
    color: var(--primary-color);
}
.user-avatar-caasa {
    width: 36px; 
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd; 
}
.btn-user-avatar-caasa .d-xl-inline { 
    font-size: 0.9rem;
    font-weight: 500;
}

/* Botones Principales Caasa */
.btn-caasa-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}
.btn-caasa-primary:hover,
.btn-caasa-primary:focus {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #fff !important;
}

.btn-caasa-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important; 
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out; 
}

.btn-caasa-secondary:hover,
.btn-caasa-secondary:focus {
    /* Al pasar el ratón, se invierten los colores */
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-caasa-warning { 
    background-color: #ffc107 !important; 
    border-color: #ffc107 !important;
    color: #000 !important;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}
.btn-caasa-warning:hover,
.btn-caasa-warning:focus {
    background-color: #e0a800 !important; 
    border-color: #d39e00 !important;
    color: #000 !important;
}

.btn-secondary2 { 
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.btn-secondary2:hover {
    background-color: #5a6268;
    border-color: #545b62;
}


/* Menú Principal de Navegación Caasa */
.main-nav-caasa {
    background-color: #ffffff; 
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid #e9ecef;  
    border-bottom: 1px solid #e9ecef; 
}

.nav-link-caasa {
    font-family: var(--font-family-main);
    color: var(--primary-color) !important; 
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    text-decoration: none;
    overflow: hidden; 
}

.main-nav-caasa .nav-link-caasa {
    text-decoration: none !important; 
}

.nav-link-caasa::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px; 
    background-color: var(--primary-color); 
    transform: translateX(-50%);
    transition: width 0.3s ease-in-out; 
}

.nav-link-caasa:hover::after,
.nav-link-caasa:focus::after {
    width: calc(100% - 2rem); 
}
.nav-link-caasa:hover,
.nav-link-caasa:focus {
    color: var(--primary-color) !important; 
}

.footer {
    background-color: #f8f9fa; 
    color: var(--text-color-default); 
    font-size: 0.9rem;
}

.footer-heading {
    font-family: var(--font-family-main);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color); 
    margin-bottom: 1rem;
}

.footer-text {
    color: #555; 
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links li a {
    color: var(--text-color-default); 
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-links li a:hover {
    color: var(--primary-color); 
    text-decoration: none; 
}

.social-icons a.social-icon {
    color: var(--text-color-default);
    font-size: 1.25rem; 
    transition: color 0.2s ease-in-out;
}

.social-icons a.social-icon:hover {
    color: var(--primary-color); 
}

.footer-contact-info li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start; 
    color: #555;
}

.footer-contact-info li i {
    color: var(--primary-color); 
    width: 20px; 
}

.copyright-text {
    font-size: 0.85rem;
    color: #6c757d; 
}

/* Ajustes para responsividad */
@media (max-width: 767.98px) {
    .footer .text-md-start {
        text-align: center !important; 
    }
    .footer-heading {
        margin-top: 1rem; 
    }
    .social-icons {
        margin-bottom: 1rem; 
    }
}

/* Contenedor principal de la página de autenticación y login */
.auth-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Título principal del formulario */
.auth-title {
    color: var(--primary-color); 
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Subtítulo o texto de bienvenida */
.auth-subtitle {
    color: #6c757d; 
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Imagen de la columna derecha */
.auth-image {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 0.75rem; 
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1); 
}

/* Inputs del formulario */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25); 
}

/* Botones de tipo de usuario */
.user-type-selector .btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Botón principal de registro */
.btn-register-submit {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem;
    font-weight: 600;
    transition: background-color 0.2s, border-color 0.2s;
}
.btn-register-submit:hover {
    background-color: var(--secondary-color); 
    border-color: var(--secondary-color);
    color: #ffffff;
}

/* Enlace para iniciar sesión */
.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.login-link:hover {
    text-decoration: underline;
}

/* Estilos para la Página de Verificación de Email */

.verification-card {
    border-radius: 0.75rem; 
    animation: fadeInScaleUp 0.6s cubic-bezier(0.165, 0.840, 0.440, 1.000) forwards; 
}

.verification-success-card {
    border-top: 5px solid var(--bs-success); 
    animation: fadeInScaleUp 0.6s cubic-bezier(0.165, 0.840, 0.440, 1.000) forwards;
}

.verification-icon {
    font-size: 4.5rem; 
    line-height: 1;
}

.verification-icon-success {
    color: var(--primary-color);
} 

.verification-title {
    font-family: var(--font-family-main);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color-headings); 
}

.verification-success-card .verification-title {
    color: var(--primary-color); 
}

.verification-text {
    font-size: 1.05rem;
    color: #495057; 
    line-height: 1.7;
}

/* Estilos para las alertas genéricas */
.verification-alert-message {
    padding: 1.5rem;
    font-size: 1.05rem;
    border-radius: 0.5rem;
}

.verification-alert-message i.fa-fw { 
    font-size: 1.3rem;
    margin-right: 0.5rem;
    vertical-align: -0.15em;
}

.verification-alert-message .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    margin-top: 0.5rem; 
}

/* Animación de entrada */
@keyframes fadeInScaleUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Estilos para Selección de Tipo de Usuario en Modal de Autenticación */
.modal-auth-custom .user-type-selector .user-type-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 0.5rem; 
    font-size: 0.85rem; 
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    height: 100%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.modal-auth-custom .user-type-selector .user-type-btn i {
    font-size: 1.5rem; 
    margin-bottom: 0.3rem;
    transition: transform 0.2s ease-in-out;
}

.modal-auth-custom .user-type-selector .user-type-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.8);
}

.modal-auth-custom .user-type-selector .btn-check:checked + .user-type-btn,
.modal-auth-custom .user-type-selector .user-type-btn.active { 
    background-color: #ffffff; 
    color: var(--primary-color); 
    border-color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25); 
}

.modal-auth-custom .user-type-selector .btn-check:checked + .user-type-btn i,
.modal-auth-custom .user-type-selector .user-type-btn.active i {
    transform: scale(1.1); 
}

.user-type-description {
    background-color: rgba(0, 0, 0, 0.15); 
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    text-align: left;
    min-height: 70px; 
    display: none; 
    border-left: 3px solid var(--secondary-color); 
    line-height: 1.5;
}
.user-type-description i {
    color: var(--secondary-color);
}

/* Ajustes adicionales para que el label de tipo de usuario sea blanco */
.modal-auth-custom .form-label.auth-modal-label {
    color: #ffffff; 
}

/* Estilos para Cabecera Móvil - Caasa.es */
.header-mobile-wrapper {
    padding-top: 56px; 
}

.navbar-caasa-mobile {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: #fff; 
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; 
}

.navbar-toggler-caasa {
    border: none;
    font-size: 1.5rem; 
    color: var(--primary-color); 
    padding: 0.25rem 0.5rem;
}
.navbar-toggler-caasa:focus {
    box-shadow: none;
}

.navbar-brand-caasa {
    padding-top: 0;
    padding-bottom: 0;
}
.logo-img-caasa-mobile {
    max-height: 35px; 
    width: auto;
}

.profile-icon-caasa-mobile .btn-icon-caasa {
    border: none;
    font-size: 1.6rem; 
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    background-color: transparent;
}
.profile-icon-caasa-mobile .user-avatar-mobile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}


/* Barra de búsqueda móvil */
.search-bar-mobile-caasa {
    position: sticky; 
    top: 56px; 
    z-index: 1020; 
}
.search-bar-mobile-caasa .form-control-sm {
    font-size: 0.9rem;
}
.search-bar-mobile-caasa .btn-sm {
    font-size: 0.9rem;
    padding: 0.25rem 0.65rem;
}

/* Estilos para Offcanvas de Navegación Principal (Izquierdo) */
.offcanvas-nav-caasa .offcanvas-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa; 
}
.offcanvas-nav-caasa .offcanvas-title {
    font-weight: 700;
    color: var(--primary-color);
}
.offcanvas-nav-caasa .nav-link {
    color: var(--text-color-default);
    padding: 0.75rem 1rem;
    font-weight: 500;
}
.offcanvas-nav-caasa .nav-link:hover,
.offcanvas-nav-caasa .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(var(--bs-primary-rgb), 0.05); 
}
.offcanvas-nav-caasa .dropdown-menu {
    border: none;
    background-color: #f8f9fa;
}
.offcanvas-nav-caasa .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}


/* Estilos para Offcanvas de Usuario (Derecho) */
.offcanvas-user-caasa .offcanvas-header {
    background-color: var(--primary-color); 
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.offcanvas-user-caasa .btn-close-white { 
    filter: none; 
}
.user-avatar-offcanvas-caasa {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}
.user-name-offcanvas-caasa {
    font-weight: 600;
    font-size: 1.1rem;
}

.offcanvas-user-caasa .nav-link {
    color: var(--text-color-default);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}
.offcanvas-user-caasa .nav-link i.fa-fw,
.offcanvas-user-caasa .nav-link i.fas, 
.offcanvas-user-caasa .nav-link i.far {
    width: 25px; 
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-color); 
}
.offcanvas-user-caasa .nav-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.offcanvas-user-caasa .badge { 
    font-size: 0.75em;
}

.btn-publish-offcanvas-caasa { 
    display: block;
    margin: 1rem;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border-radius: 0.375rem;
    background-color: var(--primary-color);
    color: #fff !important; 
    text-decoration: none;
}
.btn-publish-offcanvas-caasa:hover {
    background-color: var(--secondary-color);
    color: #fff !important;
}
.btn-publish-offcanvas-caasa[style*="var(--bs-warning)"] { 
    background-color: var(--bs-warning);
    color: #000 !important;
}
.btn-publish-offcanvas-caasa[style*="var(--bs-warning)"]:hover {
    background-color: #ffda6a; 
    color: #000 !important;
}

/* Estilos para el Banner de Selección de Usuario en la Portada caasa.es */

.hero-selector-banner .hero-choice-panel {
    position: relative; 
    display: block;
    overflow: hidden; 
    height: 85vh; 
    text-decoration: none; 
}

/* En pantallas pequeñas, uno debajo del otro y con menos altura */
@media (max-width: 991.98px) {
    .hero-selector-banner .hero-choice-panel {
        height: 60vh; 
    }
}

/* La imagen de fondo */
.hero-selector-banner .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* La transición para el efecto de zoom */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* El efecto de zoom al pasar el cursor por encima del panel */
.hero-selector-banner .hero-choice-panel:hover .background-image {
    transform: scale(1.05); 
}

/* La capa oscura para que el texto sea legible */
.hero-selector-banner .panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
    transition: background-color 0.3s ease;
}

/* Oscurecer un poco más la capa al pasar el cursor */
.hero-selector-banner .hero-choice-panel:hover .panel-overlay {
    background-color: rgba(0,0,0,0.1);
}

/* Contenedor del texto y el botón */
.hero-selector-banner .panel-content {
    position: relative; 
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center; 
    padding: 2rem;
    text-align: center;
    color: #ffffff;
}

.hero-selector-banner .panel-title {
    color: white !important;
    font-family: var(--font-family-main); 
    font-weight: 700;
    font-size: 1.8rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-selector-banner .panel-subtitle {
    font-size: 1rem;
    max-width: 80%;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Estilo para los botones blancos del banner */
.hero-selector-banner .btn-hero-choice {
    background-color: #ffffff;
    color: var(--primary-color); 
    font-family: var(--font-family-main);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 2rem;
    border-radius: 50px; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* Pequeño efecto al pasar el cursor sobre el botón */
.hero-selector-banner .btn-hero-choice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Estilos para la Sección "Cómo Funciona" - Caasa.es */

.section-title-caasa {
    font-family: var(--font-family-main);
    font-weight: 700;
    color: var(--primary-color); 
    margin-bottom: 0.75rem;
    font-size: 2.5rem; 
}

.section-subtitle-caasa {
    font-family: var(--font-family-main);
    color: var(--text-color-default); 
    font-size: 1.1rem;
    margin-bottom: 2.5rem; 
}

@media (max-width: 767.98px) { 
    .section-subtitle-caasa {
        margin-bottom: 1.5rem; 
    }
}

.hiw-card {
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem; 
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background-color: #ffffff; 
    display: flex;
    flex-direction: column;
}

.hiw-card:hover {
    transform: scale(1.05); 
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.hiw-card .card-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.hiw-icon {
    font-size: 2.8rem; 
    color: var(--primary-color); 
    margin-bottom: 1.25rem;
    line-height: 1;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), 0.1); 
}

.hiw-card-title {
    font-family: var(--font-family-main);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color-headings);
    margin-bottom: 0.75rem;
}

.hiw-card-text {
    font-family: var(--font-family-main);
    font-size: 0.9rem;
    color: #555; 
    line-height: 1.6;
    flex-grow: 1; 
}

/* Estilos para Animaciones de Entrada (Desktop) */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.from-left {
    transform: translateX(-80px);
}

.animate-on-scroll.from-right {
    transform: translateX(80px);
}

.animate-on-scroll.from-bottom {
    transform: translateY(80px);
}

.animate-on-scroll.is-visible { 
    opacity: 1;
    transform: translateX(0) translateY(0);
}

@media (max-width: 991.98px) {
    .animate-on-scroll.from-left,
    .animate-on-scroll.from-right {
        transform: translateY(50px); 
    }

     .animate-on-scroll.from-bottom {
        transform: translateY(50px);
    }
}

/* Estilos para la Sección Call to Action (CTA) - Caasa.es */

.cta-section {
    background-color: var(--primary-color); 
    
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/assets/cta-background.jpg');
    background-size: cover;
    background-position: center;
    padding-top: 4rem; 
    padding-bottom: 4rem;
}

.cta-title {
    font-family: var(--font-family-main);
    font-weight: 700;
    font-size: 2.6rem; 
    margin-bottom: 1rem;
    color: #ffffff; /* Texto blanco */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); 
}

.cta-subtitle {
    font-family: var(--font-family-main);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9); 
    line-height: 1.7;
}

.cta-buttons .btn {
    font-family: var(--font-family-main);
    font-weight: 600;
    padding: 0.8rem 2rem; 
    border-radius: 0.5rem; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 220px; 
}

/* Botón Primario del CTA */
.btn-cta-primary {
    background-color: #ffffff;
    color: var(--primary-color) !important; 
    border: 2px solid #ffffff;
}

.btn-cta-primary:hover,
.btn-cta-primary:focus {
    background-color: transparent;
    color: #ffffff !important;
    border-color: #ffffff;
}

/* Botón Secundario del CTA (ej. outline blanco) */
.btn-cta-secondary {
    background-color: transparent;
    color: #ffffff !important;
    border: 2px solid #ffffff;
}

.btn-cta-secondary:hover,
.btn-cta-secondary:focus {
    background-color: #ffffff;
    color: var(--primary-color) !important;
    border-color: #ffffff;
}

.animate-on-scroll[data-animation-delay="0.2"].is-visible {
    transition-delay: 0.2s;
}
.animate-on-scroll[data-animation-delay="0.4"].is-visible {
    transition-delay: 0.4s;
}
.animate-on-scroll[data-animation-delay="0.6"].is-visible {
    transition-delay: 0.6s;
}


/* Responsividad para los botones del CTA */
@media (max-width: 575.98px) { /* sm breakpoint */
    .cta-buttons .btn {
        width: 100%; 
        margin-bottom: 1rem; 
    }
    .cta-buttons .btn.me-0.me-sm-2 { 
        margin-right: 0 !important;
    }
    .cta-title {
        font-size: 2rem;
    }
    .cta-subtitle {
        font-size: 1rem;
    }
}

/* Estilos para la página publicar-proyecto.php */

.form-project-card {
    border: none; /* Quitar borde si se usa sombra */
    border-radius: 0.75rem;
}

.form-project-card .card-header {
    /* Usar la clase .bg-caasa-primary que ya definimos en el header para el fondo */
    /* background-color: var(--primary-color); */
    /* color: #fff; */
    border-top-left-radius: calc(0.75rem - 1px); /* Para que coincida con el card-body */
    border-top-right-radius: calc(0.75rem - 1px);
    border-bottom: none;
}
.form-project-card .card-header h1 i {
    font-size: 1.2rem; /* Ajustar tamaño del ícono en el título del card */
}

.form-section-title {
    font-family: var(--font-family-main);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.form-section-title:first-of-type {
    margin-top: 0;
}

/* Estilo para los selects de categoría cuando están deshabilitados */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.7;
}

.form-project-card .form-control,
.form-project-card .form-select {
    border-radius: 0.5rem; 
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}
.form-project-card .form-control:focus,
.form-project-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
} 

/* Estilos para la Sección Últimos Proyectos - Caasa.es */

.latest-projects-section {
    background-color: #f8f9fa; 
}

.project-card {
    border: 1px solid #e0e0e0; 
    border-radius: 0.75rem; 
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    overflow: hidden; 
}

.project-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.1);
}

.project-card-image-wrapper {
    overflow: hidden; 
}

.project-card-img {
    width: 100%;
    height: 200px; 
    object-fit: cover; 
    transition: transform 0.3s ease-in-out;
}
.project-card:hover .project-card-img {
    transform: scale(1.05); 
}

.project-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3em 0.6em;
    background-color: var(--primary-color) !important; 
    color: #fff;
    z-index: 1; 
}

.project-card .card-body {
    padding: 1rem 1.25rem; 
}

.project-card-title a {
    font-family: var(--font-family-main);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color-headings);
    text-decoration: none;
    display: block; 
}
.project-card-title a:hover {
    color: var(--primary-color);
}

.project-card-meta {
    font-size: 0.85rem;
    color: #6c757d; 
    display: flex; 
    align-items: center;
    margin-bottom: 0.3rem !important; 
}
.project-card-meta i {
    color: var(--primary-color); 
    margin-right: 0.4rem;
    width: 16px; 
    text-align: center;
}

.project-card-budget {
    font-size: 0.9rem;
    color: var(--text-color-default);
    font-weight: 500;
}
.project-card-budget strong {
    color: var(--text-color-headings);
}

.view-project-link {
    font-family: var(--font-family-main);
    font-weight: 600;
    font-size: 0.85rem !important; 
    padding: 0.3rem 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color) !important; 
    border-color: var(--primary-color) !important;
}
.view-project-link:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-outline-caasa-primary { 
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-caasa-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Estilos para la Página Individual del Proyecto (proyecto.php) */

.project-page-container {
    /* Espacio adicional si el navbar es fijo y alto */
    /* padding-top: 20px; */
}

.back-to-projects-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-color-default);
    font-weight: 500;
    text-decoration: none;
}
.back-to-projects-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.back-to-projects-link i {
    transition: transform 0.2s ease-in-out;
}
.back-to-projects-link:hover i {
    transform: translateX(-3px);
}


.project-hero-image img {
    width: 100%;
    max-height: 450px; /* Ajusta la altura máxima de la imagen principal */
    object-fit: cover;
    border-radius: 0.375rem; /* Bootstrap default rounded class for images */
}

.project-title {
    font-family: var(--font-family-main);
    font-weight: 700;
    color: var(--text-color-headings);
}

.badge.project-status-badge-large { /* Para el badge "Abierto" junto al título */
    font-size: 1rem;
    padding: 0.5em 0.75em;
    vertical-align: middle;
    background-color: var(--primary-color) !important; /* Ya definido en .project-status-badge, pero para asegurar */
}
.badge.bg-warning.project-status-badge-large { /* Para estado "En Progreso" */
    color: white !important;
}


.project-meta-info {
    font-size: 0.9rem;
}
.project-meta-info span {
    display: inline-flex; /* Para alinear íconos con texto */
    align-items: center;
}
.project-meta-info i.fa-fw { /* Íconos con ancho fijo */
    width: 20px; /* Alineación */
    opacity: 0.7;
}

.project-publisher-info .card-body {
    padding: 1rem 1.25rem;
}

.project-tabs .nav-link {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}
.project-tabs .nav-link.active {
    color: var(--bs-nav-tabs-link-active-color); /* Usar variable de Bootstrap para el color activo */
    background-color: var(--bs-nav-tabs-link-active-bg);
    border-color: var(--bs-nav-tabs-link-active-border-color);
}

.project-description-content {
    line-height: 1.7;
    color: #343a40; /* Un gris oscuro para el texto principal */
}
.project-description-content h5 { /* Si usas h5 dentro de la descripción */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color-headings);
}
.project-description-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.project-description-content ul li {
    margin-bottom: 0.4rem;
}

/* Sidebar */
.project-sidebar .card {
    border-radius: 0.5rem;
}
.project-sidebar .card-header {
    background-color: #f8f9fa; /* Un fondo claro para los headers de las tarjetas de la sidebar */
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}
.project-sidebar .card-header h5{
    font-size: 1.1rem;
    color: var(--text-color-headings);
}

.project-summary-list li,
.project-timeline-list li {
    padding: 0.6rem 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}
.project-summary-list li:last-child,
.project-timeline-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.project-summary-list li strong,
.project-timeline-list li strong {
    color: var(--text-color-default);
    margin-right: 0.5rem;
}
.project-summary-list li span,
.project-timeline-list li span {
    text-align: right;
    color: #495057;
}

.related-categories-tags .badge {
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #ddd;
}

.project-share-icons a.social-icon-share {
    font-size: 1.5rem; 
    color: #6c757d; 
    text-decoration: none;
    transition: color 0.2s ease;
}
.project-share-icons a.social-icon-share:hover {
    color: var(--primary-color);
}

.section-sub-title-caasa {
    font-family: var(--font-family-main);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Estilos para la Página de Contacto (contacto.php) */

.contact-form-card {
    border: none;
    border-radius: 0.75rem;
}

.contact-form-card .card-header {
    border-top-left-radius: calc(0.75rem - 1px);
    border-top-right-radius: calc(0.75rem - 1px);
    border-bottom: none;
}

.contact-form-card .card-header h1 i {
    font-size: 1.1em; 
    vertical-align: -0.05em;
}

.contact-form-card .form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.contact-form-card .form-control-lg,
.contact-form-card .form-select-lg {
    font-size: 1rem; 
    padding: 0.65rem 1rem; 
    border-radius: 0.375rem; 
}

.contact-form-card .form-control-lg:focus,
.contact-form-card .form-select-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25); 
}

.contact-form-card .input-group .form-select-lg {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.contact-form-card .input-group .form-control-lg {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.contact-form-card .g-recaptcha {
    transform: scale(0.9); 
    transform-origin: center;
    margin: auto; 
}

.contact-form-card .btn-caasa-primary.btn-lg {
    padding: 0.75rem 1.5rem; 
    font-size: 1.05rem;
}

.contact-form-card .alert i { 
    font-size: 1.2em;
    margin-right: 0.5rem;
    vertical-align: -0.1em;
}


.contact-form-card .small a {
    color: var(--primary-color);
    font-weight: 500;
}
.contact-form-card .small a:hover {
    color: var(--secondary-color);
}

/* Estilos para la Página de Listado de Proyectos (proyectos.php) */

.page-title-caasa { 
    font-family: var(--font-family-main);
    font-size: 2.8rem; 
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem; 
}
.filters-bar-caasa.card {
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 2rem; 
}
.filters-bar-caasa .card-body {
    padding: 1rem 1.5rem; 
}
.filters-bar-caasa .form-control,
.filters-bar-caasa .form-select {
    font-size: 0.9rem; 
}

.results-count-caasa {
    font-size: 0.95rem;
    color: #555;
}

/* Paginación */
.pagination-caasa .page-item .page-link {
    color: var(--primary-color);
    border-radius: 0.3rem; 
    margin: 0 3px; 
    border: 1px solid var(--primary-color);
}
.pagination-caasa .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    z-index: 2; 
}
.pagination-caasa .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #dee2e6;
}
.pagination-caasa .page-item .page-link:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1); 
    z-index: 2;
}
.pagination-caasa .page-item.active .page-link:hover {
    background-color: var(--primary-color); 
}


/* Modal de Filtros Avanzados */
#advancedFiltersModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
#advancedFiltersModal .modal-title {
    color: var(--primary-color);
    font-weight: 600;
}
#advancedFiltersModal .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
#advancedFiltersModal .modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Estilos para la Página de Perfil (profile.php) - Caasa.es */

.profile-page-container {
   
}

.profile-header-card {
    border-radius: 0.75rem;
    background-color: #fff; 
}

.profile-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #fff; 
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1);
}

@media (max-width: 767.98px) { 
    .profile-avatar {
        width: 120px;
        height: 120px;
        margin-left: auto; 
        margin-right: auto;
    }
    .profile-actions-col {
        margin-top: 1rem;
    }
    .profile-actions-col .btn {
        margin-bottom: 0.5rem !important; 
    }
}

.profile-name {
    font-family: var(--font-family-main);
    font-weight: 700;
    color: var(--text-color-headings);
}

.profile-user-type {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3em 0.7em;
}

.user-rating-profile .fa-star,
.user-rating-profile .fa-star-half-alt {
    color: #ffc107; 
}
.user-rating-profile .far.fa-star { 
    color: #e0e0e0; 
}
.user-rating-profile .ms-2.text-muted {
    font-size: 0.85rem;
}

.profile-meta-list li {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}
.profile-meta-list i.fa-fw {
    width: 22px; 
    opacity: 0.7;
    color: var(--primary-color); 
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}
.toggle-bio-link {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
.toggle-bio-link:hover {
    text-decoration: underline;
}

/* Estilos para la sección de Portafolio */
.portfolio-section .section-title-caasa {
    font-size: 1.8rem; 
}

.portfolio-section .project-card .project-card-title {
    font-size: 1rem; 
}
.portfolio-section .project-card .project-card-meta,
.portfolio-section .project-card .project-card-budget {
    font-size: 0.8rem;
}

/* Botones de acción en la columna derecha del perfil */
.profile-actions-col .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}
.profile-actions-col .btn-caasa-secondary,
.profile-actions-col .btn-outline-caasa-primary {
}

/* Estilos Actualizados para la Página de Perfil (profile.php) v2 - Caasa.es */

.profile-header-card-v2 {
    border: none;
    background-color: #fff;
    border-radius: 0.75rem;
}
.profile-header-card-v2 .card-body {
    padding: 2rem;
}

.profile-avatar-v2 {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: -55px; 
    background-color: #fff; 
}

.profile-name-v2 {
    font-family: var(--font-family-main);
    font-weight: 700;
    color: var(--text-color-headings);
}

/* Contenedor para los botones de acción principales */
.profile-actions-v2 {
}
.profile-actions-v2 .btn-sm {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    min-width: 100px; 
}

.profile-section-title {
    font-family: var(--font-family-main);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color-default);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    display: inline-block; 
}

.profile-meta-list-v2 {
    font-size: 0.9rem;
    padding: 0;
    margin: 0;
}
.profile-meta-list-v2 li {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
}
.profile-meta-list-v2 li i.fa-fw {
    width: 24px;
    color: var(--primary-color);
    opacity: 0.8;
}

.profile-bio-v2 p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}

/* Ajustes responsivos */
@media (max-width: 767.98px) { 
    .profile-header-card-v2 .card-body {
        padding: 1.5rem;
    }
    .profile-header-card-v2 .col-md-9 {
        text-align: center; 
    }
    .profile-actions-v2 {
        justify-content: center !important; 
        width: 100%;
        margin-top: 1rem;
    }
    .profile-meta-list-v2 li {
        justify-content: center; 
    }
    .profile-meta-list-v2 li i.fa-fw {
    }
    .profile-header-card-v2 .row > .col-md-7,
    .profile-header-card-v2 .row > .col-md-5 {
        text-align: center; 
    }
    .profile-section-title {
        border-bottom: none; 
    }
}

/* Estilos para la Página de Ajustes (settings.php) */

/* Menú lateral de ajustes */
.settings-menu .card {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}
.settings-menu .card-header {
    font-weight: 600;
    color: var(--text-color-headings);
}
.settings-menu .list-group-item {
    border: none;
    padding: 0;
}
.settings-menu .list-group-item a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color-default);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 3px solid transparent;
}
.settings-menu .list-group-item a:hover {
    background-color: #f8f9fa; 
    color: var(--primary-color);
}
.settings-menu .list-group-item.active a {
    background-color: rgba(var(--bs-primary-rgb), 0.1); 
    color: var(--primary-color);
    font-weight: bold;
    border-left-color: var(--primary-color); 
}
.settings-menu .list-group-item i {
    width: 24px;
    text-align: center;
    opacity: 0.7;
}
.settings-menu .list-group-item.active i {
    opacity: 1;
}

/* Tarjetas de contenido de ajustes */
.card.shadow-sm {
    border: 1px solid #e9ecef; 
}
.card-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.profile-avatar-settings {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.form-control-plaintext {
    padding-left: 0;
}

.form-check.form-switch {
    padding-left: 3em; 
}
.form-check.form-switch .form-check-input {
    width: 2.5em; 
    height: 1.25em;
    margin-left: -3em;
}

/* Responsividad para la página de ajustes */
@media (max-width: 991.98px) { 
    .settings-menu {
        margin-bottom: 2rem;
    }
}
@media (max-width: 767.98px) { 
    .card-body .row .col-form-label {
        margin-bottom: 0.25rem; 
        text-align: left !important;
    }
}

.profile-avatar-settings {
    width: 80px;  
    height: 80px; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 3px solid #dee2e6; 
}

.profile-avatar-settings + .form-control-file, 
.profile-avatar-settings + .form-control[type="file"] 
    max-width: 300px; 
}

/* Estilos para la Página "Mis Proyectos" - Caasa.es */


.settings-menu .list-group-item a[href*="mis-proyectos.php"] {
   
}

/* Tabla de proyectos del usuario */
.project-list-table {
    font-size: 0.9rem; 
}

.project-list-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    vertical-align: middle;
    color: #6c757d; 
}

.project-list-table .project-title-link {
    color: var(--primary-color); 
    font-weight: 600;
    font-size: 1rem;
}
.project-list-table .project-title-link:hover {
    text-decoration: underline !important;
}

.project-status-badge-table {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Responsividad para la tabla */
@media (max-width: 767.98px) {
    .project-list-table {
    }
}

/* Estilos para la Página de Edición de Proyecto */

/* Estilos de las previsualizaciones de imágenes */
.image-preview-item {
    width: 120px;
    height: 120px;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    padding: 0.25rem;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.25rem;
}

.image-preview-item .remove-image-btn {
    width: 24px;
    height: 24px;
    line-height: 1;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Estilos para la Página de Edición de Proyecto */

.image-preview-item {
    width: 100px;
    height: 100px;
    border: 2px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.15rem;
}

/* Estilo para imágenes marcadas para eliminar */
.image-preview-item.marked-for-deletion {
    opacity: 0.4;
    border-style: dashed;
    border-color: var(--bs-danger);
    transform: scale(0.95);
}

.image-preview-item .remove-image-btn {
    width: 24px;
    height: 24px;
    line-height: 1;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.image-preview-item:hover .remove-image-btn {
    opacity: 1;
}

.form-section-title-sm {
    font-family: var(--font-family-main);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color-headings);
    margin-top: 1.25rem;
}

/* Estilos para la Página "Ofertas Recibidas" */

.settings-menu .list-group-item a[href*="ofertas-recibidas.php"] {
}

/* Tabla de ofertas */
.offers-list-table {
 
}

/* Para diferenciar visualmente las ofertas aceptadas (opcional) */
.offers-list-table tr.offer-row-aceptada {
    background-color: var(--bs-success-bg-subtle); 
    border-left: 4px solid var(--bs-success); 
}

.offers-list-table tr.offer-row-rechazada,
.offers-list-table tr.offer-row-retirada {
    opacity: 0.6; 
}

.project-offers-link {
    display: inline-block;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--primary-color) !important;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.project-offers-link:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

/* Estilos para Iconos de Compartir Redes Sociales */
.project-share-icons {
  
}

.social-icon-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;  
    height: 42px; 
    border-radius: 50%; 
    background-color: #e9ecef; 
    color: var(--text-color-default); 
    font-size: 1.1rem; 
    text-decoration: none;
    transition: all 0.3s ease; 
}

.social-icon-share:hover,
.social-icon-share:focus {
    background-color: var(--primary-color); 
    color: white !important; 
    transform: translateY(-4px); 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Estilos para Calificación por Estrellas (dejar-resena.php) */
.star-rating-input {
    direction: ltr; 
    display: inline-block;
}

.star-rating-input i {
    font-size: 2.5rem; 
    color: #ffc107; 
    cursor: pointer;
    padding: 0 0.2rem;
    transition: transform 0.2s ease;
}

.star-rating-input i:hover {
    transform: scale(1.2); 
}

/* Estilos para la página Gestionar Portafolio */

.portfolio-manage-item {
    transition: all 0.3s ease;
    height: 100%;
}
.portfolio-manage-item .card-img-top {
    aspect-ratio: 1 / 1; 
    object-fit: cover;
}
.portfolio-manage-item .card-body {
    background-color: #f8f9fa;
}
.portfolio-manage-item .card-footer {
    background-color: #f8f9fa;
    border-top: none;
}
.portfolio-manage-item .remove-media { 
    
}

/* Para los videos */
.portfolio-video-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #000;
}
.portfolio-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255,255,255,0.8);
    pointer-events: none; 
}
/* Estilos para la Galería del Portafolio (profile.php) */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    border-radius: 0.375rem;
    cursor: pointer;
    background-color: #e9ecef;
}

.portfolio-item img,
.portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portfolio-item:hover img,
.portfolio-item:hover video {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.portfolio-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-item-overlay {
    opacity: 1;
}

/* Estilos para el Modal Lightbox del Portafolio (CORREGIDO) */

/* 1. Estilo del fondo del modal (el overlay oscuro) */
#portfolioLightbox {
    /* Bootstrap ya le da un fondo oscuro rgba(0,0,0,0.5) */
}

/* 2. Ajustar el contenedor principal del modal para que no sea excesivamente grande */
#portfolioLightbox .modal-dialog {
    max-width: 95%; /* Que ocupe casi todo el ancho de la pantalla */
    width: auto;    /* Se ajustará al contenido, hasta el max-width */
    display: flex;
    align-items: center; /* Centrar verticalmente */
    min-height: calc(100% - 1rem); /* Ocupar casi todo el alto */
}

/* 3. Hacer que el fondo del contenido del modal sea transparente */
#portfolioLightbox .modal-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}
#portfolioLightbox .modal-body {
    padding: 0;
}

/* 4. Estilos para el carrusel y el contenido multimedia (imagen/video) */
#portfolioLightbox .carousel-item {
    text-align: center; /* Centra la imagen si es más estrecha que el contenedor */
}

#portfolioLightbox .lightbox-media {
    max-width: 90vw;   /* La imagen no será más ancha que el 90% del ancho de la ventana */
    max-height: 80vh;  /* La imagen no será más alta que el 80% de la altura de la ventana */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem; /* Bordes redondeados para la imagen/video */
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3); /* Sombra para destacar sobre el fondo oscuro */
}

/* 5. Estilos para las flechas de navegación (para que se vean) */
#portfolioLightbox .carousel-control-prev-icon,
#portfolioLightbox .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente oscuro para el ícono */
    border-radius: 50%; /* Hacer el fondo circular */
    padding: 1.2rem;
    background-size: 50% 50%; /* Hacer el ícono de flecha (el SVG blanco) más pequeño dentro del círculo */
}

/* 6. Estilos para el botón de cierre */
#portfolioLightbox .lightbox-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 1060; 
    font-size: 1.5rem;
    opacity: 0.9;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7)); /* Sombra para que se vea bien sobre cualquier fondo */
}
#portfolioLightbox .lightbox-close-btn:hover {
    opacity: 1;
}

/* 7. Estilos para el título y descripción (caption) */
.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 4rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    pointer-events: none;
}
.lightbox-caption > * {
    pointer-events: auto;
}

/* Estilos para la Página de Profesionales */

.filters-sidebar .card {
    border-radius: 0.5rem;
}
.filters-sidebar .card-header {
    font-weight: 600;
}
.filters-sidebar .card-body {
    font-size: 0.9rem;
}
.filters-sidebar .form-label {
    margin-bottom: 0.25rem;
    color: #333;
}
.filters-sidebar .form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
}
.filters-sidebar .form-range::-moz-range-thumb {
    background-color: var(--primary-color);
}
.filters-sidebar .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tarjeta de Profesional */
.professional-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}
.professional-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.08) !important;
}
.professional-card-avatar {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: -55px; 
    background-color: #fff;
}
.professional-card .card-body {
    padding-top: 45px; 
}
.professional-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}
.professional-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}
/* Estilos para la Página de Notificaciones (notifications.php) */

.notifications-card .list-group-item:first-child {
    border-top: none;
}
.notifications-card .list-group-item:last-child {
    border-bottom: none;
}

.notification-item {
    padding: 1.25rem 1.5rem;
    transition: background-color 0.2s ease-in-out;
}
.notification-item:hover {
    background-color: #f8f9fa; 
}

.notification-icon {
    font-size: 1.5rem; 
    width: 30px; 
    text-align: center;
}

.notification-content {
    flex: 1; 
}

.notification-message {
    margin-bottom: 0.25rem;
    color: var(--text-color-default);
}
.notification-message strong {
    color: var(--text-color-headings);
}
.notification-message a {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
}
.notification-message a:hover {
    text-decoration: underline;
}

/* ================================================== */
/* Estilos para Mensajería (messages.php) - v2        */
/* ================================================== */

.messaging-container {
    height: calc(100vh - 180px); /* Altura ajustable */
    min-height: 550px;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Columna Izquierda: Lista de Conversaciones */
.conversations-list-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}
.conversations-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}
#conversations-list {
    overflow-y: auto;
    flex-grow: 1;
}
.conversation-link {
    border-radius: 0 !important;
    border-left: 4px solid transparent !important;
    transition: background-color 0.2s ease;
}
.conversation-link:hover {
    background-color: #f8f9fa;
}
.conversation-link.active {
    background-color: #e7e9f7; /* Color primario sutil */
    border-left-color: var(--primary-color) !important;
}

/* Columna Derecha: Ventana de Chat */
.chat-window-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}
.chat-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}
.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-footer {
    background-color: #fff;
}


/* Contenedor de la burbuja para alinearla */
.message-wrapper {
    display: flex;
    max-width: 70%; /* Ancho máximo de la burbuja */
}

/* Alineación de burbujas enviadas a la derecha */
.message-wrapper.sent {
    align-self: flex-end;
}

/* Alineación de burbujas recibidas a la izquierda */
.message-wrapper.received {
    align-self: flex-start;
}

/* Estilo de la burbuja en sí */
.message-bubble {
    padding: 0.6rem 1.1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}
.message-bubble p {
    margin: 0;
    line-height: 1.5;
}

/* Color para mensajes enviados por el usuario actual */
.message-wrapper.sent .message-bubble {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* Color para mensajes recibidos */
.message-wrapper.received .message-bubble {
    background-color: #e9ecef; /* Gris claro */
    color: var(--text-color-default);
    border-bottom-left-radius: 0.25rem;
}


/* Ajuste para el carrusel de la imagen principal */
#projectImageCarousel .carousel-item {
    height: 480px; 
    background-color: #f0f0f0; 
}

#projectImageCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Estilos para el Gestor de Subida de Imágenes */
.image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 150px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.upload-box:hover {
    background-color: #f0f2f5;
}
.upload-box-content {
    text-align: center;
    color: #6c757d;
}
.upload-box-content i {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: grab;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s;
}
.preview-item .remove-btn:hover {
    background-color: rgba(220, 53, 69, 0.9); 
}

/* Estilos para el arrastre (drag and drop) */
.preview-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}
.preview-item.drag-over {
    border: 2px solid var(--primary-color);
}

.image-preview-item {
    position: relative !important;
}
.image-preview-item .remove-image-preview {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
}

/* Estilos para la página "Cómo Funciona" */

.step-item {
    padding: 1.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background-color: #fff;
}

.step-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    background-color: var(--primary-color-subtle, #e7e9f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.step-item h5 {
    font-weight: 600;
    color: var(--text-color-headings);
    margin-bottom: 0.75rem;
}

.step-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #6c757d;
}

/* Lista personalizada con checks */
.custom-list-check {
    padding-left: 0;
    font-size: 0.95rem;
}
.custom-list-check li {
    padding-left: 2em;
    position: relative;
    margin-bottom: 0.8rem;
}
.custom-list-check li::before {
    content: '\f00c'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-color);
    font-size: 1.1em;
}

/* ================================================== */
/* Estilos para el Banner de Consentimiento de Cookies */
/* ================================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 450px;
    width: calc(100% - 40px);
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1050; /* Para que esté por encima de casi todo */
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.cookie-consent-banner.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.cookie-consent-content {
    padding: 1.5rem;
}

.cookie-consent-text .cookie-title {
    font-weight: 700;
    color: var(--text-color-headings);
}

.cookie-consent-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 0;
}

.cookie-consent-text p a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.cookie-consent-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-consent-actions .btn-caasa-primary {
    width: 100%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-weight: 600;
}

.cookie-consent-actions .cookie-secondary-actions {
    display: flex;
    justify-content: space-between;
}

.cookie-consent-actions .btn-link {
    text-decoration: none;
    font-weight: 600;
    color: #6c757d;
    padding: 0.5rem;
}
.cookie-consent-actions .btn-link:hover {
    color: var(--primary-color);
}

/* --- Estilos para Móviles --- */
@media (max-width: 767px) {
    .cookie-consent-banner {
        bottom: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 0.75rem 0.75rem 0 0;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
        transform: translateY(100%); 
    }
    .cookie-consent-banner.show {
        transform: translateY(0);
    }
}

/* Estilos para el Modal de Personalización de Cookies */
.cookie-category {
    padding: 1rem 0;
}
.cookie-category h6 {
    font-weight: 600;
}
.cookie-category .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}
.cookie-category .form-check-input:disabled {
    cursor: not-allowed;
    background-color: #e9ecef;
}

/* Estilos para el dropdown de búsqueda en la versión móvil */

.search-type-dropdown-mobile {
    max-width: 110px; 
    font-size: 0.8rem; 
    flex-shrink: 0; 
    background-position: right 0.5rem center; 
    padding-right: 1.75rem; 
}

/* Opcional: para que el input de texto no se encoja demasiado */
.search-bar-mobile-caasa .form-control {
    min-width: 100px;
}