/* style.css */

:root {
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Source Sans Pro', sans-serif;

    /* Neutral Color Scheme with a Primary Accent */
    --color-primary: #2563eb; /* Tailwind blue-600 */
    --color-primary-dark: #1d4ed8; /* Tailwind blue-700 */
    --color-primary-light: #60a5fa; /* Tailwind blue-400 for links on dark bg */
    
    --color-text-base: #374151; /* Tailwind gray-700 */
    --color-text-light: #f9fafb; /* Tailwind gray-50 */
    --color-text-headings: #111827; /* Tailwind gray-900 */
    --color-text-muted: #6b7280; /* Tailwind gray-500 */

    --color-bg-body: #f0f2f5; /* Light neutral background */
    --color-bg-section-light: #ffffff;
    --color-bg-section-dark: #f3f4f6; /* Tailwind gray-100 */

    /* Glassmorphism Variables */
    --glass-bg-light: rgba(255, 255, 255, 0.65);
    --glass-border-light: rgba(255, 255, 255, 0.35);
    --glass-shadow-light: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    --glass-bg-dark: rgba(31, 41, 55, 0.45); /* Darker, less transparent glass for dark backgrounds */
    --glass-border-dark: rgba(255, 255, 255, 0.15);
    --glass-shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.25);

    --blur-intensity: 10px;
    --border-radius-main: 1rem; /* 16px */
    --border-radius-small: 0.5rem; /* 8px */

    /* Transitions */
    --transition-speed-fast: 0.2s;
    --transition-speed-normal: 0.3s;
    --transition-timing-function: ease-in-out;
}

/* Base Styles */
body {
    font-family: var(--font-secondary);
    color: var(--color-text-base);
    background-color: var(--color-bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--color-text-headings);
    margin-bottom: 0.75em; /* Default bottom margin for headings */
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.5rem; } /* Tailwind text-4xl equivalent */
h2 { font-size: 2rem; }   /* Tailwind text-3xl equivalent */
h3 { font-size: 1.5rem; } /* Tailwind text-2xl equivalent */
h4 { font-size: 1.25rem; } /* Tailwind text-xl equivalent */

@media (min-width: 768px) {
    h1 { font-size: 3rem; }   /* Tailwind md:text-5xl */
    h2 { font-size: 2.5rem; } /* Tailwind md:text-4xl */
    h3 { font-size: 1.75rem; }/* Tailwind md:text-2xl or similar */
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-base);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed-fast) var(--transition-timing-function);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Global Button Styles */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 0.75rem 1.5rem; /* 12px 24px */
    font-family: var(--font-secondary);
    font-size: 1rem; /* 16px */
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: background-color var(--transition-speed-normal) var(--transition-timing-function), 
                color var(--transition-speed-normal) var(--transition-timing-function),
                transform var(--transition-speed-fast) var(--transition-timing-function),
                box-shadow var(--transition-speed-normal) var(--transition-timing-function);
    border: 1px solid transparent;
}

.btn-primary,
button[type="submit"], /* Default style for submit buttons if no other class */
.bg-blue-600 { /* Tailwind's blue-600 button from HTML */
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
}

.btn-primary:hover,
button[type="submit"]:hover,
.bg-blue-600:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Container for particle animation */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10; /* Ensure it's behind all content */
}

/* Header */
header {
    /* Tailwind handles sticky and background, this is for potential refinements */
}
#mobile-menu a:hover {
    background-color: var(--color-primary-light); /* Lighter blue for hover */
    color: var(--color-text-light);
}


/* Hero Section */
#hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* min-height: calc(100vh - 5rem); HTML has this. Max-height can be added if needed */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Hero text is white and has text-shadow via inline styles in HTML, ensuring contrast */
#hero h1, #hero p {
    color: var(--color-text-light); 
}

.hero-overlay::before { /* This class is in HTML for the gradient */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}


/* Glassmorphism Card Styles */
.glassmorphic-card {
    background: var(--glass-bg-light);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--border-radius-main);
    box-shadow: var(--glass-shadow-light);
    padding: 1.5rem; /* Default padding */
    transition: transform var(--transition-speed-normal) var(--transition-timing-function), box-shadow var(--transition-speed-normal) var(--transition-timing-function);
}
.glassmorphic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(31, 38, 135, 0.2);
}

.glassmorphic-card-dark {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--glass-border-dark);
    border-radius: var(--border-radius-main);
    color: var(--color-text-light);
    box-shadow: var(--glass-shadow-dark);
    padding: 1.5rem;
}
.glassmorphic-card-dark h1, 
.glassmorphic-card-dark h2, 
.glassmorphic-card-dark h3,
.glassmorphic-card-dark p,
.glassmorphic-card-dark label {
    color: var(--color-text-light) !important; /* Ensure text is light */
}
.glassmorphic-card-dark a {
    color: var(--color-primary-light);
}
.glassmorphic-card-dark a:hover {
    color: #93c5fd; /* Tailwind blue-300 */
}


/* Generic Card Styles (used for Team, Blog, Resources, etc.) */
.card {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center .card-image and .card-content horizontally */
    text-align: center; /* Center text within .card-content */
    background-color: var(--color-bg-section-light);
    border-radius: var(--border-radius-main);
    overflow: hidden; /* Important for image rounding and overflow control */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 100%; /* For equal height cards in a grid */
}

.card-image {
    width: 100%; /* Image container takes full width of card */
    /* For blog cards a common aspect ratio or fixed height */
    /* For team member cards, specific dimensions are applied via Tailwind in HTML (e.g., w-32 h-32) */
    overflow: hidden; /* Crucial for object-fit and border-radius on image */
    display: flex; /* To center the image itself if it's smaller than container */
    justify-content: center;
    align-items: center;
}

/* Blog card image container height */
#blog .card .card-image {
    height: 224px; /* 14rem - as per HTML */
}
/* Team member card image container styling is largely done by Tailwind classes in HTML */
#team .card .card-image {
    /* Tailwind classes like w-32 h-32 mx-auto rounded-full handle this */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers container without distortion */
    display: block; /* Remove extra space below image */
    transition: transform var(--transition-speed-normal) var(--transition-timing-function);
}
.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem; /* 24px */
    width: 100%; /* Content block takes full width */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill available space, pushing footer items down */
}
.card-content h3 {
    color: var(--color-text-headings);
    margin-top: 0;
}
.card-content p {
    color: var(--color-text-muted);
    font-size: 0.9rem; /* Slightly smaller for card descriptions */
    flex-grow: 1; /* For blog posts, make paragraph take space */
}
.card-content .text-blue-600 { /* For "Asesora Financiera Senior" etc. */
    color: var(--color-primary) !important;
}

/* "Read More" link style for Blog */
#blog .card-content a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-block; /* Allows for padding/margin if needed */
    margin-top: auto; /* Pushes to bottom if card content is flex column */
    align-self: flex-start; /* Align to start for LTR languages */
}
#blog .card-content a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
#blog .card-content a::after {
    content: ' \2192'; /* Right arrow */
    transition: transform var(--transition-speed-fast);
    display: inline-block;
}
#blog .card-content a:hover::after {
    transform: translateX(4px);
}

/* Our Process Section Icons */
#process .image-container img {
    width: 60px; /* As per HTML */
    height: 60px; /* As per HTML */
    object-fit: contain;
}

/* Partners Section Logos */
#partners img {
    max-height: 5rem; /* 80px - as per HTML */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter var(--transition-speed-normal), opacity var(--transition-speed-normal);
}
#partners img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Customer Stories Section */
#customer-stories .card-image img { /* Circular images for testimonials */
    border-radius: 50%; /* Ensure it's circular */
}

/* Events Calendar Section */
#events .glassmorphic-card {
    /* Asymmetric balance can be achieved by staggering or varying widths if desired via HTML structure */
}
#events .bg-blue-600 { /* Event date block */
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius-small);
}

/* Resources Section (Links) */
#resources .card a {
    font-weight: 600;
}
#resources .card a::after {
    content: ' \2192'; /* Right arrow */
    transition: transform var(--transition-speed-fast);
    display: inline-block;
}
#resources .card a:hover::after {
    transform: translateX(4px);
}


/* Contact Section */
#contact {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#contact label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-light); /* Text on dark glassmorphic card */
}
#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    width: 100%;
    padding: 0.85rem 1rem; /* Slightly more padding for inputs */
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for dark form */
    background-color: rgba(255, 255, 255, 0.15); /* Subtle background */
    color: var(--color-text-light); /* Light text for input */
    transition: border-color var(--transition-speed-normal), box-shadow var(--transition-speed-normal);
    font-family: var(--font-secondary);
}
#contact input[type="text"]::placeholder,
#contact input[type="email"]::placeholder,
#contact textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-light), 0.3); /* Focus ring */
}
#contact button[type="submit"] {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1.125rem; /* Larger text for main CTA */
}

/* Footer */
footer {
    background-color: #1f2937; /* Tailwind gray-800 */
    color: #d1d5db; /* Tailwind gray-300 */
}
footer h3 {
    color: var(--color-text-light);
}
footer a {
    color: #9ca3af; /* Tailwind gray-400 */
    transition: color var(--transition-speed-fast);
}
footer a:hover {
    color: var(--color-primary-light);
    text-decoration: none; /* Remove underline for footer links by default, add specific if needed */
}
footer .border-t {
    border-color: #374151; /* Tailwind gray-700 */
}
/* Footer Social Links - Text Based */
footer .flex.space-x-4 a {
    padding: 0.25rem 0; /* Small padding for easier clicking */
    font-weight: 500;
}
footer .flex.space-x-4 a:hover {
    /* color already handled by general footer a:hover */
}


/* Scroll Animation (Base State) */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--transition-timing-function), transform 0.7s var(--transition-timing-function);
    will-change: opacity, transform;
}
.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page specific styles */
/* success.html */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background-color: var(--color-bg-body);
}
.success-page-container .glassmorphic-card {
    max-width: 600px;
    width: 100%;
}
.success-page-container h1 {
    color: var(--color-primary);
}

/* privacy.html & terms.html */
.legal-page-content {
    padding-top: 120px; /* Increased to ensure header doesn't overlap, 5rem header + extra */
    padding-bottom: 4rem;
    background-color: var(--color-bg-section-light);
}
.legal-page-content .container { /* Assuming a .container class from Tailwind or custom */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.legal-page-content h1 {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}
.legal-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-headings);
}
.legal-page-content p, .legal-page-content li {
    line-height: 1.8;
    color: var(--color-text-base);
}
.legal-page-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}


/* Cookie Popup (Tailwind classes handle most, but some overrides might be here if needed) */
#cookie-popup p a { /* Style link within cookie popup */
    color: var(--color-primary-light) !important; /* Ensure high contrast on dark bg */
}
#cookie-popup p a:hover {
    color: #93c5fd !important; /* Lighter blue for hover */
}
#accept-cookies { /* Style button within cookie popup */
    background-color: var(--color-primary) !important;
}
#accept-cookies:hover {
    background-color: var(--color-primary-dark) !important;
}

/* Responsive adjustments for very small screens if needed */
@media (max-width: 380px) {
    h1 { font-size: 2rem; }
    #hero h1 { font-size: 2.25rem; }
    .btn, button, input[type="submit"], input[type="button"] {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Utility classes (examples, Tailwind covers most) */
.text-shadow-sm {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.text-shadow-md {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
.text-shadow-lg {
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}