:root {
  --color-black: #020000;
  --color-white: #FFFFFF;
  --color-accent-red: #FE003E;
  --color-accent-orange: #FA592D;

  /* Legacy variables (consider removing if fully replaced) */
  --background-color: var(--color-black);
  --text-color: #e0e0e0; /* Keeping secondary text for now */
  --primary-accent: var(--color-white);
  --secondary-accent: #888888; /* Keeping secondary accent for now */
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --blur-intensity: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden; /* Re-added: Prevent scrollbars from oversized ::before */
  font-family: 'Inter', sans-serif;
  /* background-color: var(--background-color); */ /* Remove solid background color */
  color: var(--text-color);
  position: relative; /* Needed for pseudo-element positioning */
  z-index: 0; /* Establish stacking context */
}

body::before {
  content: '';
  position: absolute;
  /* Make pseudo-element larger than viewport to cover after rotation */
  /* Using vh for width and vw for height because of 90deg rotation */
  width: 150vh; 
  height: 150vw; 
  /* Position the center of the pseudo-element at the center of the body */
  top: 50%;
  left: 50%;
  /* Center the element and rotate */
  transform: translate(-50%, -50%) rotate(90deg);
  /* Apply background */
  background: url('../assets/images/fondo.jpg') no-repeat center center;
  background-size: cover;
  /* Place behind content */
  z-index: -1;
  /* Add blur and darkening */
  filter: blur(10px) brightness(0.4);
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh; /* Full viewport height */
  width: 100vw; /* Full viewport width */
  padding: 2rem 2rem 0 2rem; /* Remove bottom padding */
  position: relative;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  padding: 2rem 4rem;
  z-index: 50; /* Increased z-index to ensure it's above hero image and cards */
  height: 8rem; /* Define a height for calculation */
}

.logo {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--primary-accent);
}

.navigation {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--secondary-accent);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: color 0.3s ease;
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--primary-accent);
}

.language-switcher span {
  color: var(--secondary-accent);
  font-size: 0.9rem;
}

.cta-button {
  background-color: var(--primary-accent);
  color: var(--background-color);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 15px; /* Matched card radius */
  text-decoration: none; /* Removed underline */
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Text is likely centered by flex parent, no text-align needed here */
}

.cta-button:hover {
  background-color: var(--secondary-accent);
  color: var(--primary-accent);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  position: relative; /* Keep relative for positioning children */
  width: 100%;
  height: 100%;
}

/* Hero Section */
.hero {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10; /* Below overlay */
  display: flex;
  align-items: flex-end;
  position: relative; 
}

.hero-image {
  max-width: 400px;
  position: absolute;
  bottom: 0;
  /* left: 4%; */ /* Keep positioning relative to main-content or viewport */
  left: calc(50% - 600px + 4%); /* Position relative to centered hero area */
  height: 100vh;
  z-index: 25; /* Adjusted: Above overlay, below cards/panel */
  isolation: isolate; /* Keep isolation */
  pointer-events: none; /* Prevent image from blocking interactions */
  /* Nuevas propiedades para control más preciso */
  max-height: 100vh; /* Limitar altura máxima */
  object-fit: contain; /* Asegurar que la imagen no se corte */
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom left;
  border-radius: 0;
  /* Nuevas propiedades para control más preciso */
  max-height: 100vh; /* Limitar altura máxima */
}

/* Adjusted for large background text */
.hero-text {
  text-align: right; /* Keep right alignment */
  z-index: 1; /* Lower level within hero context */
  position: absolute;
  top: 10vh; /* Position from top */
  left: 0;  /* Changed from 1rem */
  right: 0; /* Changed from 1rem */
  overflow: hidden; /* Keep hiding overflow while JS calculates */
}

.hero-text h1 {
  /* font-size will be set by JS */
  font-family: 'Barlow Condensed', sans-serif; /* Change font family */
  font-weight: 900;
  color: var(--primary-accent);
  line-height: 0.9;
  margin: 0;
  padding: 0; /* Reset padding, JS will handle effective margin */
  text-transform: uppercase;
  display: inline-block; /* Helps with accurate width calculation */
  white-space: nowrap; /* Prevent wrapping */
  /* letter-spacing: -0.04em; */ /* Remove letter spacing, new font is condensed */
}

/* Container for foreground text (h2, p) */
.hero-foreground-text {
  position: absolute;
  z-index: 2; /* Higher than h1 but still within hero context */
  text-align: right; /* Keep foreground text right-aligned */
  /* width: 80%; */ /* REMOVED: Allow width to be determined by content */
  /* JS will set top and right */
}

.hero-foreground-text h2 {
  font-size: 5vw; /* Doubled font size again */
  font-weight: 700;
  color: var(--primary-accent); /* Changed to primary accent color (white) */
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-style: italic; /* Added italics */
}

/* Style for the rotating keyword span */
.rotating-keyword {
  color: var(--color-accent-orange);
  /* Adjusted multiple shadows for a potentially cleaner glow */
  text-shadow: 0 0 2px var(--color-accent-orange), /* Sharper inner glow */
               0 0 8px var(--color-accent-orange), /* Medium glow */
               0 0 18px var(--color-accent-orange); /* Outer softer glow */
}

/* Style for the typewriter cursor */
.typewriter-cursor {
  display: inline-block; /* Prevents breaking line height */
  color: var(--color-accent-orange);
  margin-left: 2px; /* Small space before cursor */
  font-weight: bold;
  animation: blink 0.7s infinite;
}

.hero-foreground-text p {
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.6;
  display: block; /* Cambiado a block para independencia de ancho */
  margin-left: auto; /* Asegurar alineación derecha con block */
  margin-right: 0; /* Asegurar alineación derecha con block */
  /* Asegurar que sea visible por defecto (en desktop) */
  /* display: inline-block; */ /* Ya no es inline-block */
}

/* Blinking animation for the cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Horizontal Scrolling Sections */
.horizontal-scroll {
  width: 100%;
  position: absolute; /* Keep absolute positioning */
  left: 0;
  z-index: 5;
  overflow: visible; /* Allow content (like secondary cards) to overflow */
}

.top-scroll {
  display: none;
}

.bottom-scroll {
  bottom: 3rem; /* Reduced from 4rem to bring cards closer to footer */
  z-index: 35; /* Above overlay and image */
}

.card-container {
  display: flex;
  overflow-x: auto;
  overflow-y: visible; /* Allow vertical overflow for secondary cards */
  padding: 1rem 0;
  gap: 1.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding-left: 4rem; /* Padding inside the container */
  padding-right: 4rem; /* Padding inside the container */
  position: relative; /* Needed for arrow positioning relative to the container */
  /* Add a min-height to ensure arrows are positioned correctly even if cards are short */
  min-height: 150px; /* Adjust as needed based on card content */
}

.card-container::-webkit-scrollbar {
  display: none;
}

/* Scroll Arrows */
.scroll-arrow {
  position: absolute;
  top: 50%; /* This will now be 50% of the card-container height */
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity));
  color: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  opacity: 0; /* Start hidden */
  pointer-events: none; /* Prevent interaction when hidden */
}

.scroll-arrow.visible {
  opacity: 1;
  pointer-events: auto; /* Enable interaction when visible */
}

.scroll-arrow:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-accent-orange);
}

.scroll-left {
  left: 1rem;
}

.scroll-right {
  right: 1rem;
}

/* Glassmorphism Card Styles */
.card {
  /* position: relative; */ /* REMOVED - No longer needed for secondary cards */
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity)); /* Safari */
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 1.5rem;
  width: 280px; /* Fixed width instead of min-width */
  flex-shrink: 0; /* Prevent cards from shrinking */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Apply hover effect only when no panel is visible */
body:not(.panel-visible) .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--secondary-accent);
  line-height: 1.4;
}

/* Show CTA on card hover only when no panel is visible */
body:not(.panel-visible) .card:hover .card-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Call to Action (CTA) inside the card */
.card-cta {
  display: block; /* Take up its own line */
  margin-top: 1rem; /* Space above the CTA */
  font-weight: 700;
  color: var(--primary-accent);
  opacity: 0;
  transform: translateY(10px); /* Start slightly lower */
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: right; /* Align arrow to the right */
  text-decoration: none; /* Added to remove underline from links */
}

/* Subtle Animations (Example: Fade in) */
body {
  animation: fadeIn 1s ease-in-out;
}

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

/* Add styles for the overlay */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
    z-index: 20; /* Above hero content, below image */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none; /* Start hidden */
    /* Remove clip-path */
}

.page-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: block; /* Ensure it's displayed */
}

/* TODO: Add more subtle digital animations */
/* TODO: Responsive adjustments */

/* Container for secondary cards, dynamically positioned by JS */
.secondary-cards-container {
  position: fixed; /* Position relative to viewport */
  /* JS will set top and left */
  width: 280px; /* Match card width */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100; /* Ensure it's above everything */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px); /* Start slightly lower for transition */
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Class added by JS to show the container */
.secondary-cards-container.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Individual secondary card style - Match primary card style */
.secondary-card {
  /* Inherit styles from .card */
  background: var(--card-bg); 
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity)); 
  border: 1px solid var(--card-border);
  border-radius: 15px; /* Same as .card */
  padding: 1.5rem; /* Same as .card */
  width: 100%; /* Ensure it takes full width of container */
  /* Keep distinct properties if needed, e.g., font-size? For now, focus on container style */
  font-size: 0.9rem; /* Match .card p font-size? Or keep smaller? Let's try matching p */
  color: var(--text-color); /* Match .card p text color */
  /* Remove hover effect unless specified otherwise */
  transition: box-shadow 0.3s ease; /* Added box-shadow to transition */
  text-decoration: none; /* Added to remove underline from links */
}

/* Apply glow effect on hover for secondary card */
.secondary-card:hover {
  /* background-color: rgba(50, 50, 50, 0.9); */ /* Removed background change */
  box-shadow: 0 0 10px 1px var(--color-accent-orange); /* More subtle orange glow (reduced spread/blur) */
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--secondary-accent);
  line-height: 1.4;
}

/* --- Footer Styles --- */

.page-footer {
    position: absolute;
    bottom: 1rem; /* Position slightly above the bottom edge */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem; /* Match header horizontal padding */
    box-sizing: border-box; /* Include padding in width */
    z-index: 40; /* Increased to be above .bottom-scroll (35) */
    font-size: 0.85rem;
    color: var(--secondary-accent);
}

.footer-left span {
    /* Specific styles if needed */
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Space between icons */
}

.footer-right a {
    color: var(--secondary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
    /* Icons have intrinsic size, adjust if needed */
}

.footer-right a:hover {
    color: var(--primary-accent);
}

.footer-separator {
    margin: 0 0.5rem;
    color: var(--secondary-accent);
}

.footer-cv-link {
    color: var(--secondary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-cv-link:hover {
    color: var(--primary-accent);
}

/* --- End Footer Styles --- */ 

/* --- About Panel Styles --- */
.about-panel {
    position: fixed;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 90%; /* Responsive width */
    max-width: 700px; /* Increased Max width */
    max-height: 75vh; /* Increased Max height */
    overflow-y: auto; /* Scroll if content exceeds max-height */
    z-index: 40; /* Above image but still allows image to be seen */

    background: var(--card-bg); 
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px); /* Slightly more blur? */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    padding: 2.5rem; /* Base padding */
    padding-left: 3rem; /* Increased padding on the left */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.about-panel.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1); /* Add scale for pop effect */
}

/* Style the content inside the panel */
.about-panel h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--color-white);
    text-align: left; /* Align title right */
}

.about-panel p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0;
    text-align: left; /* Align paragraph right */
}

/* Style the close button */
.about-panel .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--secondary-accent); /* Use secondary accent for the icon */
    transition: color 0.2s ease;
}

.about-panel .close-btn svg {
    display: block; /* Prevents extra space below SVG */
    width: 24px;
    height: 24px;
}

.about-panel .close-btn:hover {
    color: var(--primary-accent); /* White on hover */
}

/* Style to prevent body scroll when panel is open */
body.no-scroll {
    overflow: hidden;
}

/* --- End About Panel Styles --- */

/* Style for the schedule button in the About panel */
.about-schedule-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--color-accent-orange);
    color: var(--color-white);
    border: none;
    border-radius: 15px; /* Matched card radius */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center; /* Added text centering */
    align-self: flex-end;
    box-shadow: 0 2px 10px rgba(250, 89, 45, 0.4);
    font-size: 0.9rem;
    text-decoration: none; /* Removed underline */
}

.about-schedule-btn:hover {
    background-color: var(--color-accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 0, 62, 0.5);
}

/* Menu toggle button - Hidden by default */
.menu-toggle {
  display: none; /* Hidden by default (desktop) */
  background: none;
  border: none;
  color: var(--primary-accent);
  cursor: pointer;
  padding: 0.5rem;
  align-items: center;
  justify-content: center;
}

/* Mobile menu panel - Hidden by default */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -300px; /* Start off-screen */
  width: 300px;
  height: 100vh;
  background: var(--card-bg); /* CHANGED: Use same glassmorphism bg as cards */
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity));
  border-left: 1px solid var(--card-border);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 200; /* Ensure it's above the mobile CTA button */
  padding-top: 5rem; /* Space for close button */
  padding-bottom: 6rem; /* INCREASED: More bottom padding for icons */
  display: flex; 
  flex-direction: column; 
  overflow-y: auto; 
  justify-content: space-between;
}

.mobile-menu-panel.visible {
  right: 0;
}

/* Mobile Menu Navigation Links */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    gap: 1.5rem; /* Space between links */
    width: 100%;
    margin-top: 2rem; /* Space below close button */
    padding: 0 2rem; /* ADDED: Horizontal padding for the links */
}

.mobile-menu-link {
    color: var(--primary-accent); /* White text */
    text-decoration: none;
    font-size: 1.2rem; /* Larger font size for menu items */
    font-weight: 700;
    transition: color 0.3s ease;
}

.mobile-menu-link:hover {
    color: var(--color-accent-orange); /* Orange on hover */
}

/* Mobile Menu Social Icons Container */
.mobile-menu-social {
    display: flex;
    justify-content: center;
    gap: 1.8rem; /* INCREASED: More space between icons */
    padding: 2.5rem 0; /* INCREASED: More vertical padding */
    width: 100%;       
    margin-top: 1rem;
    margin-bottom: 1rem; /* ADDED: Bottom margin to push away from edge */
}

.mobile-menu-social a {
    color: var(--primary-accent); /* White icon */
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    padding: 0.5rem; /* ADDED: Clickable padding around icons */
    /* transition remains */
}

.mobile-menu-social a:hover {
    color: var(--secondary-accent);
}

.mobile-menu-social svg {
    width: 28px; /* INCREASED: From 24px */
    height: 28px; /* INCREASED: From 24px */
    fill: currentColor;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Main container padding adjustment */
  .container {
    padding-left: 1rem; /* Reducir padding general izquierdo */
    padding-right: 1rem; /* Reducir padding general derecho */
  }

  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
  
  /* Show mobile elements */
  .menu-toggle {
    display: flex; /* Show on mobile */
    pointer-events: auto; /* Explicitly ensure clickable */
    z-index: 51; /* Ensure toggle itself is above anything else in the header if needed */
  }
  
  /* Header adjustments */
  .header {
    padding: 1rem 2rem;
    height: 4rem; /* Reduced from 6rem */
    /* z-index is inherited from the base .header rule */
  }
  
  /* Mobile menu panel */
  .mobile-menu-panel {
    display: flex; /* Show structure in mobile */
    transform: translateX(100%); /* But keep it off-screen until visible class is added */
  }
  
  .mobile-menu-panel.visible {
    transform: translateX(0);
  }
  
  .mobile-menu-close {
    background: none;
    border: none;
    color: var(--primary-accent);
    cursor: pointer;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem;
  }
  
  .mobile-menu-social {
    /* Simpler styles for mobile */
    gap: 1.5rem;
    padding: 2rem 0;
    /* REMOVED absolute positioning completely */
  }
  
  /* Fixed CTA button at bottom */
  .mobile-cta-button {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent-orange);
    color: var(--color-white);
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px; /* Matched card radius */
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 150;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: calc(100% - 3rem);
    max-width: 350px;
    cursor: pointer;
    display: none; /* Hidden by default, shown on mobile */
    text-decoration: none; /* Removed underline */
    text-align: center; /* Added text centering */
  }
  
  /* Hero image adjustments */
  .hero-image {
    left: -35%; /* Move further left */
    width: 100%;
    max-width: none; /* Ensure width takes precedence */
    /* Ajustes para navegadores en apps */
    height: 90vh; /* Ajustado a 90vh (antes 100vh) para consistencia */
    max-height: 90vh; /* Limitar altura máxima consistentemente */
    /* Asegurar que object-fit y position se apliquen aquí también */
    object-fit: contain;
    object-position: bottom left;
  }
  
  /* Específicamente para mejorar visualización en navegadores embebidos (como en Telegram/Instagram) */
  @supports (-webkit-touch-callout: none) {
    /* Estas reglas pueden ahora ser menos necesarias o ajustarse si aún hay diferencias */
    .hero-image {
      /* height: 90vh; */ /* Podría eliminarse si el base es 90vh */
      /* width: 90%; */ /* Mantener o ajustar si es necesario */
      /* left: -35%; */ /* Mantener o ajustar si es necesario */
    }
  }
  
  /* Text size and position adjustments */
  .hero-text {
    /* Inherit left/right: 0 from base */
    /* Ensure no mobile-specific overrides limit width */
    max-width: none;
    top: 5vh; /* Reduced from default 10vh to move text up */
  }
  
  .hero-foreground-text h2 {
    font-size: 6vw; /* Keep mobile size or adjust if needed */
  }
  
  .hero-foreground-text p {
    /* font-size: 0.9rem; */ /* Size controlled by floating layer in mobile */
    /* max-width: 90%; */ /* REMOVED: Allow natural width */
  }
  
  /* Card adjustments for mobile */
  .card {
    width: 120px;
    padding: 0.8rem;
  }
  
  .card h3 {
    font-size: 0.9rem;
  }
  
  .card p {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  .card-container {
    gap: 1rem; 
    padding-bottom: 2.5rem; 
    padding-left: 0; /* Eliminar padding izquierdo */
    padding-right: 0; /* Eliminar padding derecho */
  }
  
  /* About panel adjustments */
  .about-panel {
    left: 50%; /* Center horizontally */
    width: 90%; /* Reduce width to create side margins */
    padding: 1.5rem; /* Apply uniform padding */
    z-index: 210; /* Ensure it's above the mobile menu */
    /* Removed specific padding-left */
  }
  
  /* Hide schedule button inside about panel on mobile */
  .about-panel .about-schedule-btn {
    display: none;
  }
  
  /* Footer adjustments */
  .page-footer {
    padding: 1rem 1.5rem;
  }

  /* Ensure language switcher is clickable */
  .language-switcher {
      pointer-events: auto; /* Explicitly ensure clickable */
      z-index: 51; /* Ensure switcher is above anything else if needed */
  }
  .lang-btn {
      pointer-events: auto; /* Explicitly ensure clickable */
  }

  /* Hide bottom cards section */
  .bottom-scroll {
    display: none;
  }

  /* Adjust mobile menu panel layout if needed */
  .mobile-menu-panel {
     width: 80%; /* Make panel wider */
     max-width: 300px;
     /* REMOVED conflicting/redundant rule */
     /* .mobile-menu-social { */
       /* Mobile-specific adjustments if needed, */
       /* but the absolute positioning should work */
       /* Example: maybe adjust the gap or bottom value */
       /* gap: 1.2rem; */
       /* bottom: 1.5rem; */ /* Slightly adjust spacing for mobile */
     /* } */
  }

  /* Styles for Mobile Floating Projects View */
  .mobile-projects-view {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 90%; /* Adjust width as needed */
      max-width: 320px; /* Max width for the cards */
      max-height: 70vh; /* Limit height */
      display: flex;
      flex-direction: column;
      align-items: center; /* Center title and card wrapper */
      z-index: 210; /* Above overlay */
      background: none; /* No background for the container */
      border: none;
      padding: 0; /* No padding on the main container */
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      pointer-events: none; /* Allow clicks through container background */
  }

  .mobile-projects-view.visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto; /* Enable interaction for children */
  }

  .mobile-projects-view h4 {
      font-size: 1.5rem; /* Larger title */
      color: var(--color-white);
      margin-bottom: 1.5rem; /* Space below title */
      text-align: center;
      /* Add text shadow for better visibility? */
      text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }

  .mobile-projects-cards-wrapper {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 0.75rem; /* Space between cards */
      overflow-y: auto; /* Scroll if cards overflow */
      padding: 0 0.5rem; /* Padding inside the card wrapper */
      /* Ensure wrapper doesn't block pointer events if empty */
      pointer-events: auto;
  }

  /* Ensure secondary cards inside the view have the glass style */
  .mobile-projects-view .secondary-card {
      width: 100%; /* Take full width of wrapper */
      pointer-events: auto; /* Ensure cards are interactive */
      /* Styles like background, border, etc., are inherited from base .secondary-card */
  }
  
  /* Style for the close button inside the mobile view */
  .mobile-projects-view .mobile-view-close-btn {
      position: absolute;
      top: -10px;  /* Position above the title */
      right: -10px; /* Position to the right */
      background: rgba(0, 0, 0, 0.3); /* Slight background for visibility */
      border-radius: 50%;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      color: var(--secondary-accent);
      border: 1px solid var(--card-border);
      cursor: pointer;
      transition: all 0.2s ease;
      pointer-events: auto; /* Ensure button is clickable */
  }

  .mobile-projects-view .mobile-view-close-btn svg {
      width: 18px;
      height: 18px;
  }

  .mobile-projects-view .mobile-view-close-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: var(--primary-accent);
  }
}

/* Show the mobile CTA button on mobile */
@media (max-width: 768px) {
  .mobile-cta-button {
    display: block;
  }
}

/* Ensure horizontal scrolling for cards on mobile */
@media (max-width: 768px) {
  .card-container {
    padding-bottom: 2rem; /* Reduced space for the fixed button (was 4rem) */
  }
  
  .scroll-arrow {
    width: 40px;
    height: 40px;
  }
  
  /* Fixed CTA button positioning adjustment */
  .mobile-cta-button {
    bottom: 1rem; /* Reduced from 1.5rem to bring it closer to cards */
  }
}

/* Add highlight effect for card (used by mobile CTA) */
.card.highlight {
  box-shadow: 0 0 0 3px var(--color-accent-orange);
  animation: pulse 1s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(250, 89, 45, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(250, 89, 45, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(250, 89, 45, 0);
  }
}

/* Remove underline from card CTA link */
.card-cta {
    text-decoration: none;
}

/* --- End Footer Styles --- */ 

/* --- About Panel Styles --- */
/* --- End About Panel Styles --- */

/* --- Contact Panel Specific Styles --- */
.contact-panel {
    /* Inherits base from .about-panel */
    text-align: center; /* Center content inside */
    padding-left: 2.5rem; /* Restore balanced padding */
}

.contact-panel h4 {
    text-align: center;
}

.contact-panel .contact-email a {
    color: var(--primary-accent); 
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    word-break: break-all; /* Prevent long email overflow */
}

.contact-panel .contact-email a:hover {
    color: var(--color-accent-orange);
}

.contact-panel .contact-social-icons {
    display: flex;
    justify-content: center;
    gap: 1.8rem; /* Match mobile menu social gap */
    margin-top: 1.5rem; /* Space above icons */
}

.contact-panel .contact-social-icons a {
    color: var(--secondary-accent); /* Match footer */
    transition: color 0.3s ease;
}

.contact-panel .contact-social-icons a:hover {
    color: var(--primary-accent);
}

.contact-panel .contact-social-icons svg {
    width: 28px; /* Match mobile menu */
    height: 28px;
    fill: currentColor;
}

/* --- End Contact Panel Styles --- */

/* Style for the schedule button in the About panel */
/* Footer adjustments */
.page-footer {
    padding: 1rem 1.5rem;
}

/* Contact panel adjustments for mobile */
.about-panel.contact-panel {
    padding: 1.5rem; /* Uniform padding on mobile */
}

/* Ensure language switcher is clickable */
.language-switcher {
    pointer-events: auto; /* Explicitly ensure clickable */
    z-index: 51; /* Ensure switcher is above anything else if needed */
}

.lang-btn {
    pointer-events: auto; /* Explicitly ensure clickable */
}

/* Style for the anchor wrapping card content */
.card-link-wrapper {
    display: block; /* Make the link fill the card */
    height: 100%; /* Fill height */
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit text color from parent (.card) */
}

/* Ensure text colors inside the link wrapper are correct */
.card-link-wrapper h3 {
    color: var(--primary-accent);
}
.card-link-wrapper p {
    color: var(--secondary-accent);
}
.card-link-wrapper .card-cta {
    /* CTA specific styles are mostly handled by .card-cta */
    /* Ensure color is correct if needed */
    color: var(--primary-accent);
}

/* Clase especial para navegadores embebidos que será añadida con JS */
.embedded-browser .hero-image {
  height: 90vh !important;
  width: 90% !important;
  left: -33% !important;
  max-height: 90vh !important;
}

/* Ajuste adicional para Android WebView embebido */
.android-webview .hero-image {
  height: 90vh !important;
  max-height: 90vh !important;
  left: -33% !important;
}

/* Optimizaciones adicionales para navegadores integrados en aplicaciones y pantallas más pequeñas */
@media (max-width: 480px) {
  .hero-image {
    height: 90vh;
    max-height: 90vh;
    left: -33%;
  }
  
  .hero-image img {
    object-position: bottom left;
  }
  
  /* Asegurar que el texto principal se mantenga visible */
  .hero-text {
    width: 80%;
    margin-left: auto;
    left: auto;
    right: 0;
  }
}

/* Capa flotante para el texto del párrafo */
.floating-paragraph-overlay {
  position: fixed; /* Cambiado a fixed para mayor control */
  /* Posicionamiento exacto para coincidir con el texto original */
  z-index: 40; /* Aumentado para asegurar que esté en la capa superior */
  background-color: transparent; /* Sin fondo */
  border: none; /* Sin borde */
  box-shadow: none; /* Sin sombra */
  padding: 0; /* Sin relleno */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* Permitir que los clics pasen a través */
  /* Ocultar por defecto en desktop */
  display: none; 
}

/* Ocultar la capa flotante cuando un panel está visible */
body.panel-visible .floating-paragraph-overlay {
  opacity: 0;
  visibility: hidden;
}

/* Estilo específico para el texto dentro de la capa - exactamente igual al original */
.floating-paragraph-overlay p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--primary-accent);
  margin: 0;
  text-align: right;
  /* max-width y otros estilos serán definidos por JS */
  display: inline-block; /* Igualar al original */
  padding: 0;
  white-space: normal;
  word-wrap: break-word;
  /* Asegurar que sea visible por defecto (en desktop) */
  display: inline-block; 
}

/* Ajustes para móvil */
@media (max-width: 768px) {
  /* Ocultar el párrafo original en móvil */
  .hero-foreground-text p {
    display: none !important; 
  }
  
  /* Mostrar la capa flotante en móvil */
  .floating-paragraph-overlay {
    display: block; /* O inline-block si es necesario */
  }

  /* Estilos del párrafo flotante en móvil */
  .floating-paragraph-overlay p {
    font-size: 0.7rem; /* Reducido desde 0.9rem */
    text-align: right; /* Asegurar alineación derecha */
    /* El resto de estilos (max-width, etc.) los gestionará JS */
  }
} 

/* --- CV Page Styles --- */
.cv-section {
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Allow scroll within main content */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10rem; /* space for header */
    padding-bottom: 4rem; /* space before footer */
}

.cv-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2.5rem;
    width: 100%;
    max-width: 900px;
    color: var(--primary-accent);
}

.cv-card h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.cv-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-accent-orange);
}

.cv-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
}

.cv-card p,
.cv-card li {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

.cv-card ul {
    list-style: disc inside;
    margin-left: 1rem;
}

.cv-card em {
    font-style: italic;
}

.cv-row {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
}

.cv-left-card {
    flex: 0 0 30%;
}

.cv-right-card {
    flex: 0 0 70%;
}

@media (max-width: 768px) {
    .cv-row {
        flex-direction: column;
    }

    .cv-left-card,
    .cv-right-card {
        flex: 0 0 100%;
    }
}
/* --- End CV Styles --- */ 

.cv-header-card {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 2rem; /* prevent overlap */
} 

.channel-item {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-align: center;
}
.channel-item a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.channel-item a:hover {
    color: var(--color-accent-orange);
}
.channel-item svg {
    flex-shrink: 0;
}

/* Ensure extra spacing between paragraphs in header card */
.cv-header-card .cv-header p {
    margin-bottom: 1.5rem;
} 

/* Override email link color in CV left card */
.cv-left-card a[href^="mailto:"] {
    color: var(--text-color);
    text-decoration: none;
}
.cv-left-card a[href^="mailto:"]:hover {
    color: var(--primary-accent);
}

/* Education items styling */
.education-item {
    margin-bottom: 1.5rem;
}
.education-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--primary-accent);
}
.education-item p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Skills and Languages list styling */
.skills-list,
.languages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.5rem;
}
.skill,
.language {
    display: inline-block;
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    font-size: 0.9rem;
    color: var(--primary-accent);
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.skill:hover, .language:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Icons for skills and languages tags */
.skills-list .skill::before {
    content: "⚙️";
    margin-right: 0.4rem;
}
.languages-list .language::before {
    content: "🌐";
    margin-right: 0.4rem;
}

/* Project and Reference subcards styling */
.project-item,
.reference-item {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.project-item h3,
.reference-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-accent);
}

.project-item p,
.reference-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .project-item,
    .reference-item {
        padding: 0.75rem 1rem;
    }
    .project-item h3,
    .reference-item h3 {
        font-size: 0.95rem;
    }
    .project-item p,
    .reference-item p {
        font-size: 0.85rem;
    }
} 

/* Experience items styling */
.experience-item {
    margin-bottom: 2rem;
}
.experience-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-accent);
}
.experience-item p {
    margin: 0.3rem 0 0.8rem 0;
    font-size: 0.95rem;
    color: var(--text-color);
}
.experience-item ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}
.experience-item li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
} 

/* Back button styling for CV */
.back-button {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-right: 1rem;
}
.back-button:hover {
    color: var(--color-accent-orange);
} 

/* ==================== Responsive Tweaks for CV ==================== */

/* 1. Header adjustments for mobile */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .header .navigation {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .back-button,
    .language-switcher {
        font-size: 0.9rem;
    }
}

/* 2. Experience section readability on mobile */
@media (max-width: 768px) {
    .experience-item h3 {
        font-size: 1rem;
    }
    .experience-item p {
        font-size: 0.9rem;
    }
    .experience-item li {
        font-size: 0.85rem;
    }
    .experience-item {
        margin-bottom: 1.5rem;
    }
}

/* 3. Adjust desktop column proportions (slimmer left) */
.cv-left-card {
    flex: 0 0 25%; /* was 30% */
}
.cv-right-card {
    flex: 0 0 75%;
} 

/* Mobile layout: stack and reorder cards */
@media (max-width: 768px) {
    .cv-row {
        flex-direction: column;
    }
    .cv-right-card {
        order: 1; /* experience first */
        margin-bottom: 2rem;
    }
    .cv-left-card {
        order: 2; /* contact second */
    }
    /* extra spacing to avoid overlap */
    .cv-header-card {
        margin-bottom: 3rem; /* reduced from 6rem */
    }
    .cv-row {
        margin-top: 2rem; /* reduced from 4rem */
    }
    .cv-header {
        padding-bottom: 2rem; /* Extra internal space */
    }
    .cv-section {
        padding-top: 5rem; /* Slightly reduced from 6rem */
    }
} 

@media (max-width: 768px) {
    .cv-section {
        height: 100%;
        overflow-y: auto; /* restore scroll */
    }
} 

@media (max-width: 768px) {
    .cv-row {
        margin-top: 4rem; /* increase spacing */
    }
} 