/* --- Global Variables and Base Styles --- */
:root {
    /* Analogous Color Scheme (Base: Blue) */
    --primary-color: #3d5af1;
    --primary-darker: #304ffe;
    --secondary-color: #448aff;
    --accent-color: #009688;
    --accent-hover: #00796b;

    /* Background & Surface Colors */
    --background-color: #f0f2f5;
    --section-bg-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-bg-solid: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --dark-overlay: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    
    /* Text Colors */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --text-color-muted: #6c757d;
    --headings-color: #222222;

    /* Fonts */
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* UI Elements */
    --border-radius: 15px;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --transition-speed: 0.4s;
}

/* --- General Body and Typography --- */
body {
    background-color: var(--background-color);
    font-family: var(--font-body);
    color: var(--text-color-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .hero-title, .section-title, .card-title {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--headings-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

p, .main-text {
    font-size: 1.1rem;
    color: var(--text-color-dark);
}

/* --- Utility and Helper Classes --- */
.section-bg {
    background-color: var(--section-bg-color);
}

.py-5 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* --- Glassmorphism Elements --- */
.glass-nav, .glass-card, .glass-card-solid, .glass-card-accordion {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
}

.glass-card-solid {
    background: var(--glass-bg-solid);
}

/* --- Global Component Styles --- */
.btn.custom-btn, button[type="submit"] {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color-light);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-headings);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-speed) ease;
}

.btn.custom-btn:hover, button[type="submit"]:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(61, 90, 241, 0.4);
    background: linear-gradient(45deg, var(--primary-darker), var(--primary-color));
    color: var(--text-color-light);
}

.form-control {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 15px;
    transition: all var(--transition-speed) ease;
    color: var(--text-color-dark);
}

.form-control:focus {
    background: var(--text-color-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(61, 90, 241, 0.25);
    color: var(--text-color-dark);
}

.form-label {
    color: var(--text-color-dark);
    font-weight: 600;
    font-family: var(--font-headings);
}

/* On dark backgrounds (like contact form) */
#contact .form-label {
    color: var(--text-color-light);
}


/* --- Header --- */
.header .glass-nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all var(--transition-speed) ease;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--headings-color) !important;
}

.nav-link {
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--text-color-dark) !important;
    margin: 0 10px;
    position: relative;
    transition: color var(--transition-speed) ease;
}

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

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.hero-title {
    color: var(--text-color-light);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-light);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}


/* --- Cards --- */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card .card-image {
    width: 100%;
    overflow: hidden;
}

.card .card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

#asesores .card-image {
    padding-top: 1.5rem;
}

#asesores .card-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

.card-body {
    z-index: 1;
}

/* --- Custom Slider (News) --- */
#newsSlider .carousel-inner {
    border-radius: var(--border-radius);
    overflow: hidden;
}

#newsSlider .card {
    height: 100%;
    box-shadow: none;
}
#newsSlider .card:hover {
    transform: none;
}
#newsSlider .card-image {
    height: 250px;
}
#newsSlider .card-image img {
    height: 100%;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 20px;
    background-size: 50%;
}


/* --- FAQ Accordion --- */
.accordion-item.glass-card-accordion {
    background-color: var(--glass-bg-solid);
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
}

.accordion-button {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    color: var(--headings-color);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-darker);
    background-color: rgba(61, 90, 241, 0.1);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-body {
    color: var(--text-color-dark);
}

/* --- Contact Section --- */
#contact {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}


/* --- Footer --- */
.footer {
    background-color: #1a1a1a;
}

.footer h5 {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.footer .text-muted {
    color: #a0a0a0 !important;
}

.footer .footer-link {
    color: #a0a0a0;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    display: inline-block;
    padding: 5px 0;
}

.footer .footer-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer .border-top {
    border-color: #444 !important;
}


/* --- Animation on Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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


/* --- Specific Page Styles --- */
/* success.html */
.success-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

/* privacy.html & terms.html */
.legal-page-content, .about-page-content, .contact-page-content {
    padding-top: 120px;
    padding-bottom: 5rem;
}

.legal-page-content h2, .about-page-content h2 {
    margin-bottom: 2rem;
}

.legal-page-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --- Barba.js Transitions --- */
.barba-leave-active,
.barba-enter-active {
  transition: opacity .5s ease;
}
.barba-leave-to,
.barba-enter-from {
  opacity: 0;
}


/* --- Responsive Design --- */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 2rem;
    }

    .navbar-collapse {
        background: var(--glass-bg-solid);
        border-radius: var(--border-radius);
        margin-top: 1rem;
        padding: 1rem;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        background-attachment: scroll; /* Parallax doesn't work well on mobile */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}