/* ===== VARIABLES ===== */
:root {
  /* Primary Colors - Split-Complementary Scheme */
  --color-primary: #e63946; /* Bright Red */
  --color-primary-dark: #b72c36;
  --color-secondary: #457b9d; /* Blue */
  --color-secondary-dark: #1d3557;
  --color-tertiary: #f1faee; /* Off-White */
  --color-accent: #a8dadc; /* Light Blue */
  --color-success: #2a9d8f;
  --color-warning: #e9c46a;
  --color-danger: #e76f51;
  
  /* Neutrals */
  --color-dark: #222222;
  --color-medium: #666666;
  --color-light: #f8f9fa;
  --color-white: #ffffff;
  
  /* Typography */
  --font-heading: 'Archivo Black', sans-serif;
  --font-body: 'Roboto', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Borders & Shadows */
  --border-radius: 0px; /* Brutalism - Sharp edges */
  --box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.2);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== GLOBAL STYLES ===== */
html, body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background-color: var(--color-light);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .title, .subtitle {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-dark);
}

h1.title, h2.title {
  margin-bottom: 2rem;
  position: relative;
}

h1.title::after, h2.title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background-color: var(--color-primary);
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--color-medium);
}

strong {
  color: var(--color-dark);
}

section {
  padding: 5rem 0;
  position: relative;
}

section:nth-child(odd) {
  background-color: var(--color-light);
}

section:nth-child(even) {
  background-color: var(--color-white);
}

.container {
  padding: 0 var(--spacing-md);
}

/* ===== ANIMATIONS ===== */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(40px);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s var(--transition-bounce) forwards;
}

.delayed-animation {
  opacity: 0;
}

/* ===== BUTTONS & INTERACTIVE ELEMENTS ===== */
.button, button, input[type="submit"] {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: var(--border-radius);
  transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s ease;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.button:hover, button:hover, input[type="submit"]:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
}

.button:active, button:active, input[type="submit"]:active {
  transform: translate(0px, 0px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

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

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

.button.is-outlined.is-white {
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.button.is-outlined.is-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.button:hover::before {
  left: 100%;
}

/* Form elements */
.input, .textarea, .select select {
  border-radius: var(--border-radius);
  border: 2px solid var(--color-medium);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

.input:hover, .textarea:hover, .select select:hover {
  border-color: var(--color-primary-dark);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-right: 10px;
}

.switch + label {
  cursor: pointer;
  vertical-align: middle;
  font-weight: bold;
}

.switch[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch[type="checkbox"] + label {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  background-color: #ccc;
  border-radius: 34px;
  transition: .4s;
  margin-right: 10px;
  cursor: pointer;
}

.switch[type="checkbox"] + label:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: .4s var(--transition-bounce);
}

.switch[type="checkbox"]:checked + label {
  background-color: var(--color-primary);
}

.switch[type="checkbox"]:checked + label:before {
  transform: translateX(26px);
}

/* ===== NAVIGATION ===== */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: var(--color-white);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-brand .navbar-item {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-primary);
}

.navbar-menu {
  transition: all 0.3s ease;
}

.navbar-item {
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  transition: all 0.3s var(--transition-bounce);
  transform: translateX(-50%);
}

.navbar-item:hover {
  color: var(--color-primary);
}

.navbar-item:hover::after {
  width: 100%;
}

.navbar-burger {
  width: 3.25rem;
  height: 3.25rem;
}

.navbar-burger span {
  height: 3px;
  width: 30px;
  left: calc(50% - 15px);
  background-color: var(--color-primary);
}

.navbar-burger:hover {
  background-color: transparent;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(69, 123, 157, 0.7), rgba(230, 57, 70, 0.7));
  z-index: 1;
}

.hero-body {
  z-index: 2;
  position: relative;
}

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

.hero .title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero .subtitle {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin-bottom: 2.5rem;
}

.hero .button {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

/* Background images */
[style*="background-image"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== CARDS & GALLERY ===== */
.card {
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-white);
  border: 3px solid var(--color-dark);
}

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

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

.image-container {
  height: 250px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img, .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content .title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card-content p {
  flex-grow: 1;
}

.card-content .button {
  align-self: flex-start;
  margin-top: auto;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1rem;
  height: 100%;
}

.gallery-item {
  height: 250px;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--box-shadow);
  border: 3px solid var(--color-dark);
  transition: transform 0.3s var(--transition-bounce);
}

.gallery-item:hover {
  transform: scale(1.02);
}

/* ===== SECTIONS SPECIFIC STYLES ===== */
/* Servicios (Workshops) */
#servicios .card {
  height: 100%;
}

#servicios .field {
  display: flex;
  align-items: center;
}

/* Metodología */
#metodologia .content h3 {
  margin-top: 2rem;
  color: var(--color-secondary-dark);
}

/* Visión */
#vision {
  color: var(--color-white);
}

#vision .title, #vision .content h3 {
  color: var(--color-white);
}

#vision .content p {
  color: var(--color-tertiary);
}

#vision .button {
  box-shadow: 4px 4px 0px rgba(255, 255, 255, 0.2);
}

/* Equipo (Team) */
#equipo .card-image {
  height: 300px;
}

#equipo .subtitle {
  color: var(--color-primary);
  margin-top: -0.5rem;
}

/* Contacto */
#contacto .field {
  margin-bottom: 1.5rem;
}

#contacto label.label {
  color: var(--color-dark);
  font-weight: bold;
}

#contacto .button {
  margin-top: 1rem;
}

/* Prensa (Press) */
#prensa .card-content p.is-size-7 {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Investigación (Research) */
#investigacion {
  background-color: var(--color-light);
}

#investigacion .content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

#investigacion .content ul li {
  margin-bottom: 0.5rem;
}

/* Carreras (Careers) */
#carreras .box {
  border-radius: var(--border-radius);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s ease;
  margin-bottom: 1.5rem;
  height: 100%;
  border: 2px solid var(--color-dark);
}

#carreras .box:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
}

#carreras img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: 3px solid var(--color-dark);
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--color-secondary-dark);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

.footer .title, .footer h3 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.footer p {
  color: var(--color-tertiary);
}

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

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

.footer a {
  color: var(--color-tertiary);
  transition: color 0.3s ease;
  text-decoration: none;
}

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

.social-links a {
  display: inline-block;
  margin-right: 1rem;
  transition: transform 0.3s var(--transition-bounce);
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer .content.has-text-centered {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
}

/* ===== ADDITIONAL PAGES ===== */
/* About, Privacy, Terms pages */
.page-content {
  padding-top: 100px;
  min-height: 70vh;
}

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

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

/* ===== COOKIE CONSENT ===== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(34, 34, 34, 0.9);
  color: var(--color-white);
  padding: 1rem;
  z-index: 9999;
  display: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.cookie-content p {
  margin: 0;
  color: var(--color-white);
  padding-right: 2rem;
}

.cookie-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

.cookie-content button {
  white-space: nowrap;
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 1023px) {
  .hero .title {
    font-size: 2.5rem;
  }
  
  .hero .subtitle {
    font-size: 1.5rem;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-content p {
    margin-bottom: 1rem;
    padding-right: 0;
  }
}

@media screen and (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
  
  .hero .title {
    font-size: 2rem;
  }
  
  .hero .subtitle {
    font-size: 1.2rem;
  }
  
  h2.title {
    font-size: 1.8rem;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
  }
  
  .card-image, .image-container {
    height: 200px;
  }
  
  #equipo .card-image {
    height: 250px;
  }
  
  .footer {
    padding: 3rem 0 1rem;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .hero .title {
    font-size: 1.8rem;
  }
  
  .buttons .button {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }
}