/* style.css */

:root {
    /* Font Families */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'DM Sans', sans-serif;

    /* Core Colors - Gradient Theme */
    --color-primary-start: #007CF0; /* Bright Blue */
    --color-primary-end: #00DFD8;   /* Bright Cyan */
    --color-primary-hover-start: #005cbf;
    --color-primary-hover-end: #00b3a9;

    --color-accent: #FFD700;        /* Gold/Yellow */
    --color-accent-dark: #cca300;

    /* Text Colors */
    --text-color-dark: #2d3748;  /* Dark Gray (for light backgrounds) */
    --text-color-light: #ffffff; /* White (for dark backgrounds/overlays) */
    --text-color-medium: #4a5568; /* Medium Gray */
    --text-color-subtle: #718096; /* Subtle Gray */

    /* Background Colors */
    --bg-light: #f8fafc;    /* Very Light Gray (e.g., slate-50) */
    --bg-white: #ffffff;
    --bg-dark: #1a202c;     /* Dark Gray (for footer) */
    --bg-dark-hover: #2d3748;

    /* Gradient Definitions */
    --gradient-primary: linear-gradient(to right, var(--color-primary-start), var(--color-primary-end));
    --gradient-primary-hover: linear-gradient(to right, var(--color-primary-hover-start), var(--color-primary-hover-end));
    --gradient-hero-overlay: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    --gradient-section-dark: linear-gradient(135deg, var(--color-primary-start) 0%, #00529b 100%); /* Example for stats */

    /* Borders */
    --border-color: #e2e8f0; /* Light gray border */
    --border-radius-sm: 0.375rem; /* 6px */
    --border-radius-md: 0.5rem;   /* 8px */
    --border-radius-lg: 0.75rem;  /* 12px */
    --border-radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing (can be used for margins/paddings if not using Tailwind) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-8: 2rem;
    --space-16: 4rem;

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;

    /* Header Height */
    --header-height: 5rem; /* 80px */
}

/* Base Styles */
body {
    font-family: var(--font-secondary);
    color: var(--text-color-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    -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(--text-color-dark); /* Default dark color for headings */
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-4);
}
h1 { font-size: 2.5rem; } /* 40px */
h2 { font-size: 2rem; }   /* 32px */
h3 { font-size: 1.5rem; } /* 24px */
h4 { font-size: 1.25rem; }/* 20px */

@media (min-width: 768px) {
    h1 { font-size: 3rem; }   /* 48px */
    h2 { font-size: 2.5rem; } /* 40px */
    h3 { font-size: 1.75rem; }/* 28px */
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-color-medium);
}

a {
    color: var(--color-primary-start);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover {
    color: var(--color-primary-hover-start);
    text-decoration: underline;
}

/* Global Button Styles */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: bold;
    padding: 0.75rem 1.75rem; /* 12px 28px */
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition-medium);
    text-align: center;
    border: none;
    box-shadow: var(--shadow-md);
    transform-origin: center;
}

.btn-primary,
button[type="submit"]:not([class*="bg-"]), /* Default submit button style */
input[type="submit"]:not([class*="bg-"]) {
    background: var(--gradient-primary);
    color: var(--text-color-light);
}
.btn-primary:hover,
button[type="submit"]:not([class*="bg-"]):hover,
input[type="submit"]:not([class*="bg-"]):hover {
    background: var(--gradient-primary-hover);
    box-shadow: var(--shadow-lg);
    transform: scale(1.03);
}
.btn-primary:active,
button[type="submit"]:not([class*="bg-"]):active,
input[type="submit"]:not([class*="bg-"]):active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--color-accent);
    color: var(--text-color-dark);
}
.btn-secondary:hover {
    background-color: var(--color-accent-dark);
    box-shadow: var(--shadow-lg);
    transform: scale(1.03);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary-start);
    border: 2px solid var(--color-primary-start);
    box-shadow: none;
}
.btn-outline:hover {
    background-color: var(--color-primary-start);
    color: var(--text-color-light);
    box-shadow: var(--shadow-md);
}

/* Link styled as button */
.link-button {
    font-family: var(--font-primary);
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}
.link-button-primary {
    background: var(--gradient-primary);
    color: var(--text-color-light) !important; /* Override link color */
}
.link-button-primary:hover {
    background: var(--gradient-primary-hover);
    text-decoration: none;
    transform: translateY(-2px);
}


/* Header / Navigation */
header {
    /* Tailwind sticky top-0 z-50 bg-white/80 backdrop-blur-md shadow-md */
    height: var(--header-height);
}
header nav a {
    font-family: var(--font-secondary);
    font-weight: 500; /* DM Sans medium */
    padding: 0.5rem 0;
    position: relative;
}
header nav a::after { /* Underline effect for active/hover */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-start);
    transition: width 0.3s ease;
}
header nav a:hover::after,
header nav a.active::after { /* Add 'active' class via JS */
    width: 100%;
}
#mobile-menu {
    border-top: 1px solid var(--border-color);
}
#mobile-menu a {
    padding: 0.75rem 1.5rem; /* 12px 24px */
}


/* Hero Section */
#hero {
    /* min-height: calc(100vh - var(--header-height)); /* Example: full viewport height minus header */
    /* Tailwind handles bg-cover bg-center */
    /* Overlay applied in HTML inline style */
    padding-top: var(--header-height); /* Account for fixed header */
}
#hero h1 {
    color: var(--text-color-light); /* Enforced white */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}
#hero p {
    color: var(--text-color-light); /* Enforced light gray or white */
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}
/* Hero button uses global .btn-primary */


/* Section Styling */
section {
    padding-top: var(--space-16); /* Default top padding for sections */
    padding-bottom: var(--space-16); /* Default bottom padding for sections */
}
section:last-of-type { /* No extra bottom padding for the last section before footer */
    /* padding-bottom: 0; */ /* Covered by footer padding */
}

.section-title,
section h2 { /* Unified section title styling */
    text-align: center;
    margin-bottom: var(--space-8); /* More space after title */
    color: var(--text-color-dark); /* Darker for contrast */
    position: relative;
    padding-bottom: var(--space-2);
}
.section-title::after,
section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-full);
}


/* Card Styles (Global) */
.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    /* align-items: center; Applied by Tailwind text-center on card or custom on specific card types */
}
.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

.card .card-image,
.card .image-container {
    width: 100%;
    /* Fixed height should be applied by Tailwind utilities (e.g., h-56) or specific card type styles */
    /* e.g. for success story cards: height: 14rem; (224px) */
    overflow: hidden;
    position: relative; /* For potential overlays or absolute positioned elements inside */
}
.card .card-image img,
.card .image-container img {
    width: 100%;
    height: 100%; /* Requires parent .card-image to have a fixed height */
    object-fit: cover;
    display: block; /* Remove extra space under img */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth zoom */
}
.card:hover .card-image img,
.card:hover .image-container img {
    transform: scale(1.1);
}

.card .card-content {
    padding: var(--space-4); /* Default padding */
    flex-grow: 1; /* Allows content to fill space if card height is fixed */
    display: flex;
    flex-direction: column;
    /* text-align: center; If all content inside card should be centered by default */
}
.card .card-content h3 {
    margin-top: 0;
    color: var(--color-primary-start);
}
.card .card-content p {
    color: var(--text-color-medium);
    font-size: 0.95rem;
    flex-grow: 1; /* Makes paragraph take available space, pushing actions to bottom */
}
.card .card-content a[href^="#"], /* Read more links */
.card .card-content a:not([class*="btn-"]) { /* General links in cards */
    color: var(--color-primary-start);
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
    display: inline-block; /* For better styling */
    transition: var(--transition-fast);
}
.card .card-content a[href^="#"]:hover,
.card .card-content a:not([class*="btn-"]):hover {
    color: var(--color-primary-hover-start);
    letter-spacing: 0.5px; /* Subtle hover effect */
}

/* Specific Card Types - Example for Centering Content if Tailwind text-center is not used on card */
.team-member-card, .testimonial-slide { /* Example for cards where content is centered */
    text-align: center;
}
.team-member-card .card-image,
.team-member-card .image-container { /* For circular team images */
    width: 150px; /* Adjust as needed */
    height: 150px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4); /* Space between image and text */
    border: 4px solid var(--bg-white);
    box-shadow: var(--shadow-md);
}


/* Statistics Section */
#estadisticas {
    background: var(--gradient-section-dark);
    color: var(--text-color-light);
}
#estadisticas h2, #estadisticas p {
    color: var(--text-color-light) !important; /* Override default text colors */
}
#estadisticas h2::after { /* Adjust title underline color for dark bg */
    background: var(--color-accent);
}
.stat-number {
    font-size: 3rem; /* 48px */
    font-weight: bold;
    /* Color is white from parent */
}
@media (min-width: 768px) {
    .stat-number { font-size: 3.5rem; } /* 56px */
}
.progress-bar-container {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-full);
    height: 10px;
    overflow: hidden;
}
.progress-bar {
    background-color: var(--color-accent);
    height: 100%;
    border-radius: var(--border-radius-full);
    transition: width 1.5s ease-in-out;
}

/* Testimonial Slider */
.testimonial-slider {
    position: relative;
    /* min-height: 300px; Ensure it has some height */
}
.testimonial-slide {
    /* Tailwind p-8 md:p-12 bg-gradient-to-tr from-blue-50 to-cyan-50 rounded-xl shadow-lg */
    /* JS handles display:none/block */
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    position: absolute; /* For fade transition */
    top: 0;
    left: 0;
    width: 100%;
}
.testimonial-slide.active-slide {
    opacity: 1;
    position: relative; /* Bring to front */
}
.testimonial-slide img { /* Avatar */
    border: 4px solid var(--bg-white);
}
.slider-prev, .slider-next {
    /* Tailwind styles applied */
    z-index: 10;
    transition: var(--transition-fast);
}
.slider-prev:hover, .slider-next:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* External Resources Section */
#recursos-externos .card h3 {
    font-size: 1.25rem; /* Slightly smaller for these cards */
}

/* Careers Section */
#carreras {
    /* Tailwind bg-gradient-to-br from-blue-700 via-cyan-600 to-sky-700 text-white */
}
#carreras h2, #carreras p {
    color: var(--text-color-light);
}
#carreras h2::after {
    background: var(--color-accent);
}
#carreras a.btn-primary, #carreras a.bg-yellow-400 { /* Explicitly style the button here if needed */
    background-color: var(--color-accent);
    color: var(--text-color-dark);
}
#carreras a.btn-primary:hover, #carreras a.bg-yellow-400:hover {
    background-color: var(--color-accent-dark);
}

/* Press Section */
#prensa article img {
    /* Tailwind w-36 h-24 object-cover rounded-lg */
}
#prensa article h3 {
    font-size: 1.2rem;
}

/* Contact Form */
#contacto, #formulario-contacto { /* Ensure consistent padding if using ID from another page */
    /* padding-top: var(--space-16); */
}
#contacto .max-w-3xl { /* Form container */
    /* Tailwind bg-white p-8 md:p-12 rounded-xl shadow-2xl */
}
form label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 500;
    color: var(--text-color-medium);
}
form input[type="text"],
form input[type="email"],
form textarea {
    /* Tailwind w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 */
    border-color: var(--border-color);
    border-radius: var(--border-radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font-secondary);
}
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
    border-color: var(--color-primary-start);
    box-shadow: 0 0 0 3px rgba(0, 124, 240, 0.2); /* Focus ring */
    outline: none;
}


/* Footer */
footer {
    background-color: var(--bg-dark);
    color: #a0aec0; /* Lighter gray for footer text (slate-400) */
}
footer h3 {
    color: var(--text-color-light);
    margin-bottom: var(--space-4);
}
footer ul {
    list-style: none;
    padding: 0;
}
footer ul li {
    margin-bottom: var(--space-2);
}
footer ul a {
    color: #a0aec0; /* Footer link color */
    transition: var(--transition-fast);
    font-size: 0.9rem;
}
footer ul a:hover {
    color: var(--color-primary-end); /* Cyan hover for footer links */
    text-decoration: none;
    padding-left: 5px; /* Subtle shift on hover */
}
footer .border-t {
    border-color: #4a5568; /* Darker border in footer */
}


/* Page specific styles */
/* success.html */
body.success-page { /* Add class 'success-page' to body of success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.success-page main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* privacy.html & terms.html */
body.legal-page main section:first-of-type {
    /* The title banner section */
}
body.legal-page main section:nth-of-type(2) { /* The main content section */
    padding-top: calc(var(--header-height) / 2); /* Reduced padding if banner is already padded */
}
/* If the header is fixed and content scrolls under it, the main container needs padding */
.main-content-legal { /* Wrap content of privacy/terms in a div with this class if header is truly fixed over it */
    padding-top: calc(var(--header-height) + 2rem); /* Header height + some breathing room */
}
.prose h2, .prose h3 { /* Specific for prose content on legal pages */
    color: var(--text-color-dark);
    margin-top: 2em;
    margin-bottom: 1em;
}
.prose ul {
    margin-left: 1.5em;
}

/* Cookie Popup */
#cookie-popup {
    /* HTML applies inline styles for positioning and basic appearance */
    /* This can be used for finer details or overrides if needed */
    font-size: 0.9rem;
}
#cookie-popup p {
    color: var(--text-color-light);
    margin-bottom: var(--space-2);
}
#accept-cookie {
    /* Uses global button styling with Tailwind overrides or specific inline styles */
    background-color: var(--color-primary-end);
    color: var(--text-color-light);
    font-weight: bold;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-full);
}
#accept-cookie:hover {
    background-color: var(--color-primary-hover-end);
}

/* ScrollReveal related - initial hidden state (optional, as JS handles it) */
[data-scrollreveal] {
    /* opacity: 0; */ /* If you want to manage initial state via CSS, not just JS */
}


/* Asymmetric Balance and Morphing - Conceptual classes */
/* Asymmetry is best handled with Tailwind grid/flex. Morphing needs JS or complex CSS */
.morph-element {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy morph */
}
.morph-element:hover {
    border-radius: 10% 40% 20% 30% / 30% 20% 40% 10%; /* Example morph shape */
    transform: scale(1.05) rotate(3deg);
}

/* Glassmorphism (Example) */
.glassmorphic {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* Subtle shadow */
}


/* Utility for gradient text */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* General Background Image Styling */
.bg-image-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.bg-image-overlay::before { /* For applying overlay to elements with this class */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero-overlay);
    z-index: 1; /* Ensure overlay is above background but below content */
}
.bg-image-overlay > * { /* Ensure content is above overlay */
    position: relative;
    z-index: 2;
}

/* Ensure text contrast on various backgrounds - use Tailwind's text-colors primarily */
/* Use text-shadow for light text on complex/light backgrounds if overlay is not enough */
.light-text-on-image {
    color: var(--text-color-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* For team member cards with circular images and centered text as per previous HTML*/
.card.text-center .card-image { /* If .card-image is used for avatar */
    margin-left: auto;
    margin-right: auto;
    width: 150px; /* Example size */
    height: 150px;
    border-radius: 50%;
}

/* Responsive typography and spacing adjustments if Tailwind isn't sufficient */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    section {
        padding-top: calc(var(--space-16) * 0.75);
        padding-bottom: calc(var(--space-16) * 0.75);
    }
    .section-title, section h2 {
        margin-bottom: calc(var(--space-8) * 0.75);
    }
    .btn, button, input[type="submit"], input[type="button"] {
        padding: 0.65rem 1.5rem;
    }
}

/* Final Check on Specific Constraints from Prompt */
/* - success.html min-height: 100vh and centering (handled by body.success-page and main flex styles) */
/* - Hero text white (handled) */
/* - privacy/terms padding-top. Using .main-content-legal as a wrapper or body.legal-page for section targeting */
/* - Card image centering and object-fit (handled) */
/* - "Read more" links styled (handled) */
/* - Footer social links text (HTML uses text, CSS styles them as links) */