/* CSS Variables for Ultra Minimalist Premium Theme */
:root {
  --bg-color: #FFFFFF;
  
  /* Corporate Colors */
  --color-plum: #240a1e; 
  --color-lilac: #9c89ce;
  
  /* Neutral colors */
  --text-main: #111111;
  --text-muted: #777777; /* Slightly darker for better contrast */
  --border-color: #E2E2E2; /* Slightly more visible but still subtle */
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px; /* Baseline for rems reduced for slightly smaller typography */
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.7; /* Increased for better readability */
  overflow-x: hidden;
  font-weight: 300;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

section[id], footer[id], div[id] {
  scroll-margin-top: 110px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-plum);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.6;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem; /* Increased padding for safety edges */
}

.section {
  padding: 6rem 0; /* Slightly reduced vertical padding for better flow */
}

.text-center {
  text-align: center;
}

/* Perfecting Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.5rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid var(--color-plum);
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.75rem;
  line-height: 1;
}

.btn-primary {
  background-color: var(--color-plum);
  color: white;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-plum);
}

.btn-outline {
  background: transparent;
  color: var(--color-plum);
}

.btn-outline:hover {
  background-color: var(--color-plum);
  color: white;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  transition: padding 0.3s ease;
}

header.scrolled .nav-container {
  padding: 0.5rem 2.5rem;
}

.logo img {
  height: 85px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

header.scrolled .logo img {
  height: 55px;
}

.nav-links {
  display: flex;
  gap: 3.5rem; 
}

.nav-links li a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links li a:hover {
  color: var(--color-plum);
  opacity: 1;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.2rem;
  color: var(--text-main);
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-social-links {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem; /* Account for larger header */
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8rem; 
}

.hero-content {
  flex: 1;
}

.hero-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-lilac);
  margin-bottom: 2rem;
  display: block;
  font-weight: 500;
}

.hero-title {
  font-size: 3.8rem; /* REDUCED TITLES */
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -1px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  max-width: 450px;
  line-height: 1.8;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
}

.hero-image-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-image {
  width: 100%;
  max-width: 550px;
  display: block;
  object-fit: cover;
}

/* Sections Common */
.section-title {
  font-size: 2.8rem; /* REDUCED TITLES */
  margin-bottom: 5rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--color-lilac); 
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 1.5rem;
  font-weight: 500;
}



/* Full Width Cards (Single Column) */
.full-width-card {
  border: 1px solid var(--border-color);
  padding: 4.5rem 3.5rem;
  width: 100%;
  transition: border-color 0.4s ease;
}

.full-width-card:hover {
  border-color: var(--color-plum);
}

.full-width-card h3 {
  font-size: 1.6rem; 
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  letter-spacing: -0.5px;
  color: var(--color-plum);
  font-weight: 400;
  font-family: var(--font-heading);
}

.full-width-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.full-width-card p:last-child {
  margin-bottom: 0;
}

/* Sobre Mi Section */
.about-container {
  display: flex;
  align-items: center;
  gap: 8rem;
}

.about-image-wrap {
  flex: 1;
}

.about-image {
  width: 100%;
  max-width: 600px;
  display: block;
  object-fit: cover;
}

.about-content {
  flex: 1;
}

.about-content p {
  margin-bottom: 2rem;
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 1.1rem;
}

.highlight-text {
  color: var(--color-plum);
  font-weight: 400;
}

/* Tesis Section */
.tesis-container {
  display: flex;
  align-items: center;
  gap: 8rem;
  background-color: #fafafa;
  padding: 4rem;
  border-radius: 16px;
}

.tesis-container .about-image-wrap {
  order: 2; /* Image on the right */
}

.tesis-container .about-content {
  order: 1; /* Text on the left */
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.portfolio-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  aspect-ratio: 4/5;
}

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

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

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(36, 10, 30, 0.9), transparent);
  padding: 2rem 1.5rem 1.5rem;
  color: white;
}

.portfolio-overlay h4 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.portfolio-overlay p {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Footer Layout */
.footer-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.footer-info p, .footer-info .contact-item {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-form-footer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  padding: 1rem 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  font-family: inherit;
  transition: border-color 0.4s;
  font-size: 1.05rem;
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-bottom-color: var(--color-plum);
}



/* Footer (Light/Minimalist) */
footer {
  background: var(--bg-color); 
  color: var(--text-muted);
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.social-links {
  display: flex;
  gap: 2rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--color-plum);
  opacity: 1;
}

.legal-links {
  display: flex;
  gap: 2.5rem;
}

.legal-links a {
  transition: color 0.3s ease;
  font-weight: 500;
}

.legal-links a:hover {
  color: var(--color-plum);
  opacity: 1;
}

.footer-credits {
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.footer-credits a {
  color: var(--color-plum);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

/* Blog Styles */
.blog-header {
  text-align: center;
  margin-bottom: 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.full-width-card {
  background-color: white;
  padding: 4rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.legal-content h1, 
.legal-content h2, 
.legal-content h3, 
.legal-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content ul,
.legal-content li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-color: var(--color-plum);
}

.blog-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

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

.blog-category {
  color: var(--color-lilac);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-block;
}

.blog-card-title {
  font-size: 1.4rem;
  color: var(--color-plum);
  margin-bottom: 1rem;
  line-height: 1.4;
  letter-spacing: -0.5px;
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animaciones de Revelación (Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.scroll-to-top {
    position: fixed;
    bottom: 75px;
    right: 0;
    width: 45px;
    height: 45px;
    background-color: var(--color-plum);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.15);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--color-lilac);
}

/* Botón flotante Email */
.floating-email-btn {
    position: fixed;
    bottom: 20px;
    right: 0;
    width: 45px;
    height: 45px;
    background-color: var(--color-lilac);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.15);
}

.floating-email-btn:hover {
    background-color: var(--color-plum);
}

/* Ocultar badge de reCAPTCHA */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Lightbox Styling */
.zoomable-image {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

#lightbox.active #lightbox-img {
  transform: scale(1);
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3.5rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  transition: color 0.3s ease;
}

#lightbox-close:hover {
  color: var(--color-plum);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container, .about-container, .tesis-container, .footer-top {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 3rem;
  }
  
  .footer-info .contact-item {
    justify-content: flex-start;
  }
  
  .about-image-wrap {
    order: -1;
  }

  .tesis-container .about-image-wrap {
    order: -1;
  }
  
  .hero-image-wrap {
    order: -1;
    justify-content: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #FFFFFF;
    padding: 0;
    margin: 0;
    align-items: center;
    z-index: 1000;
    gap: 0.5rem;
    
    /* Full menu animation */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .nav-links.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-links li {
    text-align: center;
    padding: 0.1rem 0;
    width: 100%;
    
    /* Initial state for staggered animation */
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Active state for staggered animation */
  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Delays for each link */
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
  .nav-links.active li.mobile-social-links { transition-delay: 0.4s; }

  .nav-links li a {
    font-size: 1.1rem;
  }
  
  .mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
  }

  .mobile-social-links a {
    font-size: 1.5rem;
    color: var(--color-plum);
    transition: opacity 0.3s ease;
  }

  .mobile-social-links a:hover {
    opacity: 0.6;
  }
  
  .mobile-menu-btn {
    display: block;
    position: relative;
    z-index: 1001;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    padding: 1rem;
    margin: 0 !important;
    border-radius: 0;
    -webkit-appearance: none;
    text-align: center;
  }
  
  .section {
    padding: 5rem 0;
  }
  
  .section-title {
    font-size: 2.2rem;
    margin-bottom: 3rem;
  }
  

  
  /* PERFECT MOBILE BOXES: Reduced padding for mobile screens */
  .full-width-card {
    padding: 2.5rem 1.5rem;
  }
  
  .footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    align-items: center;
    width: 100%;
    font-size: 0.65rem;
  }
  
  .social-links {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
  }
  
  .legal-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
  }
}
