/* ==========================================================================
   1. CSS Variables & Root Styles
   ========================================================================== */

:root {
  /* Color Palette - Complementary (Blue & Orange) */
  --primary-color: #4A90E2; /* A vibrant, trustworthy blue */
  --accent-color: #F5A623; /* A warm, energetic orange */
  --primary-color-dark: #357ABD;
  
  /* Backgrounds & Surfaces */
  --dark-bg: #0a0a0f; /* Deep space blue/black */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.15);

  /* Typography */
  --text-light: #f5f5f5;
  --text-secondary: #a0a0b0;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Merriweather', serif;

  /* Spacing & Borders */
  --border-radius: 12px;
  --section-padding: 6rem 1.5rem;
}

/* ==========================================================================
   2. Global & Base Styles
   ========================================================================== */

html {
  scroll-behavior: smooth;
  background-color: var(--dark-bg);
}

body {
  font-family: var(--font-body);
  color: var(--text-light);
  background-color: var(--dark-bg);
  line-height: 1.7;
  font-size: 1.1rem;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .title, .subtitle {
  font-family: var(--font-heading);
  font-weight: 700;
}

.title {
    color: var(--text-light) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

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

.section {
    padding: var(--section-padding);
}

a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   3. Reusable Components & Utility Classes
   ========================================================================== */

/* Glassmorphism Card Style */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.h-100 {
    height: 100%;
}

/* Global Button Styles */
.button {
    font-family: var(--font-heading);
    border-radius: 8px;
    border-width: 2px;
    font-weight: 700;
    transition: all 0.3s ease-in-out;
}

.button.is-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.button.is-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.button.is-primary.is-outlined, .button.is-link.is-outlined {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.button.is-primary.is-outlined:hover, .button.is-link.is-outlined:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Form Input Styles */
.input, .textarea {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input::placeholder, .textarea::placeholder {
    color: var(--text-secondary);
}

.input:focus, .textarea:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(74, 144, 226, 0.25);
    color: var(--text-light);
}

.label {
    color: var(--text-light);
    font-family: var(--font-heading);
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */

.navbar.is-fixed-top {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-item, .navbar-link {
  color: var(--text-light);
  font-family: var(--font-heading);
}

.navbar-item:hover, .navbar-link:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.navbar-burger {
    color: var(--text-light);
}

@media screen and (max-width: 1023px) {
    .navbar-menu {
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
}


/* ==========================================================================
   5. Page Sections
   ========================================================================== */

/* Hero Section */
#hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

#hero .title {
    font-size: 3.5rem;
    font-weight: 900;
}

/* Partners Section */
#partners img {
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

#partners img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

/* Customer Stories & Generic Cards */
.card {
    background: transparent; /* Override Bulma default */
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.card.glass-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card .media-content .title {
    color: var(--text-light) !important;
}

.card .media-content .subtitle {
    color: var(--text-secondary) !important;
}

.card .content {
    color: var(--text-light);
}

.card-image {
    text-align: center;
}
.card-image img {
    margin: 0 auto;
}

/* Gallery Section */
#galeria figure {
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 2px solid var(--glass-border);
}

#galeria img {
    transition: transform 0.4s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#galeria figure:hover img {
    transform: scale(1.1);
}

/* Research/Resources Section */
#recursos .card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    text-align: center;
    align-items: center;
}

#recursos .card-content .title {
    margin-bottom: 1rem;
}

#recursos .card-content p {
    color: var(--text-secondary);
}

#recursos .button {
    margin-top: auto;
}

/* Careers Section */
.career-divider {
    background-color: var(--glass-border);
    height: 1px;
    margin: 1.5rem 0;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.footer {
    background-color: var(--dark-bg);
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
}

.footer .title {
    color: var(--text-light) !important;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.footer a {
    color: var(--text-secondary);
    position: relative;
    text-decoration: none;
    padding-bottom: 3px;
}

.footer a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

.footer a:hover {
    color: var(--text-light);
}

.footer a:hover:before {
    visibility: visible;
    transform: scaleX(1);
}

/* ==========================================================================
   7. Specific Pages & Animations
   ========================================================================== */

/* Legal & Other Content Pages */
.content-page {
    padding-top: 8rem; /* Space for fixed navbar */
    padding-bottom: 4rem;
    min-height: calc(100vh - 80px); /* Adjust based on footer height */
}
.content-page .content h1,
.content-page .content h2,
.content-page .content h3 {
    color: var(--text-light);
    margin-top: 2rem;
}
.content-page .content p,
.content-page .content li {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Success Page */
.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.success-page .icon {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

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

/* Page Transitions */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   8. Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.5rem;
    }
    
    #hero .title {
        font-size: 2.5rem;
    }

    body {
        font-size: 1rem;
    }

    .column.is-two-thirds, .column.is-half, .column.is-one-third {
        width: 100% !important;
    }
}