:root {
    --primary-blue: #004481;
    /* Azul oscuro del logo */
    --accent-blue: #0099ff;
    /* Azul claro */
    --primary-orange: #ff9900;
    /* Naranja del botón */
    --text-dark: #333333;
    --bg-light: #f4f8fb;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    overflow-x: hidden;
    /* Prevenir scroll horizontal */
}

/* --- Navbar --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* Efecto moderno tipo vidrio */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 50px;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 700;
    color: var(--text-dark) !important;
    margin-right: 15px;
    position: relative;
    transition: color 0.3s;
}

/* CORRECCIÓN: Usamos ::before para el subrayado para no romper el ::after del dropdown (la flecha) */
.nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-orange);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::before {
    width: 100%;
}

/* Estado activo (Inicio) fijo pero elegante */
.nav-item.active .nav-link::before {
    width: 100%;
}

/* Ajuste específico para el dropdown para asegurar que la flecha (caret) se vea bien */
.dropdown-toggle::after {
    vertical-align: 0.255em;
    /* Alineación por defecto de Bootstrap */
    border-top-color: var(--text-dark);
    /* Asegurar color correcto */
}

.nav-item.dropdown:hover .dropdown-toggle::after {
    border-top-color: var(--primary-orange);
    /* Color naranja al pasar el mouse */
}

/* --- NUEVO: Dropdown con Scroll --- */
.dropdown-menu {
    max-height: 300px;
    /* Altura máxima fija */
    overflow-y: auto;
    /* Scroll vertical automático si excede la altura */
}

/* Personalización opcional del scrollbar para navegadores Webkit (Chrome, Safari) */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

.btn-ingresar {
    background-color: var(--primary-orange);
    color: white;
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.3);
}

.btn-ingresar:hover {
    background-color: #e68a00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 153, 0, 0.4);
}

.user-icon-circle {
    background-color: #eef2f5;
    color: var(--primary-blue);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-icon-circle:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.6) 100%), url('../img/foto_home.jpg');
    background-size: cover;
    background-position: center 30%;
    padding: 120px 0 180px 0;
    position: relative;
}

.hero-title {
    color: var(--primary-blue);
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 40px;
    font-weight: 600;
    animation: fadeInDown 1s ease-out;
}

/* --- Search Bar Modern --- */
.search-container {
    background: white;
    padding: 10px;
    border-radius: 60px;
    box-shadow: 0 20px 50px rgba(0, 68, 129, 0.15);
    /* Sombra azulada sutil */
    margin-top: 30px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    position: relative;
    z-index: 20;
    border: 1px solid rgba(0, 0, 0, 0.03);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-input-group {
    border-right: 1px solid #eee;
    padding: 10px 20px;
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-group:last-of-type {
    border-right: none;
}

.search-input-group i {
    color: var(--accent-blue);
    margin-right: 12px;
    font-size: 1.1rem;
}

.form-control-plaintext {
    display: inline-block;
    width: 100%;
    font-weight: 700;
    color: #444;
    outline: none;
    font-size: 1rem;
}

.form-control-plaintext::placeholder {
    color: #999;
    font-weight: 600;
}

.btn-buscar {
    background: linear-gradient(45deg, var(--primary-orange), #ffbb33);
    color: white;
    border-radius: 50px;
    padding: 15px 45px;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 153, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-buscar:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(255, 153, 0, 0.4);
    filter: brightness(1.05);
}

/* --- Stats/Trust Bar (Floating) --- */
.trust-bar {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    padding: 30px 0;
    position: relative;
    margin-top: -80px;
    z-index: 10;
    border-bottom: 4px solid var(--accent-blue);
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #f0f0f0;
    transition: transform 0.3s;
}

.trust-item:hover {
    transform: translateY(-3px);
}

.trust-item:last-child {
    border-right: none;
}

.trust-icon {
    width: 64px;
    height: auto;
    margin-right: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.trust-text h6 {
    font-weight: 800;
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.trust-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
    font-weight: 600;
}

/* --- Featured Section --- */
.featured-section {
    padding: 100px 0 80px 0;
    background-color: #fbfdff;
    position: relative;
}

/* Decorative background circle */
.featured-section::before {
    content: '';
    position: absolute;
    top: 50px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(0, 153, 255, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.section-title {
    color: var(--primary-blue);
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Adorno debajo del titulo */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 2px;
    margin: 10px auto 0;
}

.see-more-wrapper {
    text-align: right;
    margin-bottom: 20px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.see-more-link {
    color: var(--primary-orange);
    font-weight: 800;
    text-decoration: none;
    transition: margin 0.3s;
    display: inline-block;
}

.see-more-link:hover {
    text-decoration: none;
    color: #e68a00;
    margin-right: 5px;
}

/* CARD STYLES UPDATED TO MATCH TEMPLATE (BLUE BG) */
.card-custom {
    border: none;
    border-radius: 15px;
    /* Un poco menos redondeado para ser mas fiel */
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    background: var(--primary-blue);
    /* Fondo Azul por defecto */
    height: 100%;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit; /* toma la imagen del inline style */
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    z-index: 1;
}

.card-img-top {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    object-fit: contain;
    /* Ajusta la imagen para cubrir el contenedor */
    transition: transform 0.5s ease;
}

.card-custom:hover .card-img-top {
    transform: scale(1.1);
}

.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-orange);
    /* Naranja solido */
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    /* Texto blanco */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-body {
    background: var(--primary-blue) url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;

    /* Fondo Azul */
    padding: 20px;
    padding-bottom: 0px;
    border-top: none;
    color: white;
    /* Texto Blanco */
}

.card-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
    /* Blanco */
    font-size: 1.25rem;
}

.card-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    /* Blanco transparente */
    margin-bottom: 15px;
    display: block;
}

.card-footer-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.rating-stars {
    color: var(--primary-orange);
    /* Estrellas naranja */
    font-size: 0.9rem;
}

.rating-text {
    font-weight: 700;
    color: white;
    /* Texto rating blanco */
    margin-left: 5px;
    font-size: 0.9rem;
}

.btn-details {
    background: rgb(6, 139, 248);
    /* Boton Blanco */
    color: white;
    /* Texto Azul */
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 6px 20px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-details:hover {
    background: rgb(6, 139, 248);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* --- How it works --- */
.how-it-works {
    background: radial-gradient(circle at center, #fbfdff 0%, #edf4fa 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Floating shapes for decoration */
.shape-deco {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-blue), transparent);
    opacity: 0.05;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    left: 50px;
}

.main-logo-large {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 68, 129, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.step-item {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s;
}

.step-icon-wrapper {
    background: white;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.step-item:hover .step-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.step-icon-img {
    height: 90px;
    width: auto;
}

.step-title {
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.step-desc {
    color: #666;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 80px 0 100px 0;
    position: relative;
    overflow: hidden;
}

.azul {
    color: white;
    background: var(--primary-blue) url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.azul::hover{
    color: #fff;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.footer-logo {
    height: 60px;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-icons a {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-3px);
}

.btn-contact-footer {
    background: var(--primary-orange);
    color: white;
    border-radius: 30px;
    padding: 12px 35px;
    border: none;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn-contact-footer:hover {
    transform: scale(1.05);
    background: #ffaa33;
}

/* --- ANIMATIONS & MOBILE RESPONSIVE --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet & Mobile Tweaks */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-container {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 15px;
    }

    .search-input-group {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px 0;
    }

    .search-input-group:last-of-type {
        border-bottom: none;
        margin-bottom: 15px;
    }

    .btn-buscar {
        width: 100%;
        padding: 12px;
    }

    .trust-bar {
        margin-top: 30px;
    }

    .trust-item {
        flex-basis: 50%;
        /* 2 items per row on tablet/mobile */
        max-width: 50%;
        border-right: none;
        margin-bottom: 20px;
        justify-content: flex-start;
        padding-left: 15px;
    }

    /* Add border between columns in the 2x2 grid */
    .trust-item:nth-child(odd) {
        border-right: 1px solid #f0f0f0;
    }

    .see-more-wrapper {
        text-align: center;
        margin-top: 10px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
    }

    .hero-section {
        padding: 100px 0 60px 0;
        text-align: center;
        background-position: center center;
    }

    .hero-title {
        font-size: 2rem;
        margin-top: 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .search-container {
        margin-top: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    /* Trust bar on mobile: 2x2 grid looks good, keep from tablet style */
    .trust-bar {
        padding: 20px 0;
    }

    .trust-item {
        margin-bottom: 15px;
    }

    .trust-icon {
        width: 35px;
        margin-right: 10px;
    }

    .trust-text h6 {
        font-size: 0.95rem;
    }

    .trust-text p {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* How it works mobile */
    .main-logo-large {
        max-width: 60%;
        margin-bottom: 40px;
    }

    .how-it-works .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
        /* Stack steps vertically */
    }

    .step-item {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 10px;
        background: white;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    }

    .step-icon-wrapper {
        margin: 0 20px 0 0;
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .step-icon-img {
        height: 60px;
    }

    .step-title {
        margin-bottom: 0;
        font-size: 1.1rem;
    }

    .footer {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
        margin: 20px 0;
    }

    .social-icons {
        justify-content: center;
        display: flex;
        margin-bottom: 20px;
    }

    .col-md-4.text-md-right {
        text-align: center !important;
    }
}