/* Maximiliano Calva - Premium Personal Brand Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #0f172a;
  /* Slate 900 - Richer dark */
  --surface-color: #1e293b;
  /* Slate 800 */
  --text-primary: #f8fafc;
  /* Slate 50 */
  --text-secondary: #94a3b8;
  /* Slate 400 */
  --accent-color: #2563eb;
  /* Electric Blue (Royal Blue) */
  --accent-glow: rgba(37, 99, 235, 0.3);
  --border-color: #334155;
  --font-main: 'Inter', sans-serif;
  --container-width: 1200px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  /* Slightly more rounded */
  border: 1px solid var(--accent-color);
  box-shadow: 0 4px 14px 0 var(--accent-glow);
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: var(--container-width);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 0.75rem 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  top: 10px;
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  /* Extra padding for rounded pill */
}

/* Premium Logo Gradient */
.navbar .container>a:first-child {
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
  display: inline-block;
}

.navbar .container>a:first-child:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0.85;
  transition: all 0.3s ease;
}

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

.nav-links a.active {
  color: var(--accent-color);
  font-weight: 600;
  opacity: 1;
}

/* Header Agendar Llamada Button glow */
.nav-links .btn {
  padding: 10px 24px;
  border-radius: 100px;
  /* Matches pill header */
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
  font-weight: 600;
  opacity: 1;
}

.nav-links .btn:hover {
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
  color: white;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  top: 120%;
  /* Add a tiny gap */
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 0;
  animation: dropdownFade 0.3s ease forwards;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.dropdown-content a {
  color: var(--text-secondary);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--accent-color);
  padding-left: 24px;
  /* subtle indent hover */
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  /* Invisible bridge to prevent hover loss */
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('/assets/hero_tech_bg.png');
  /* Will need to place image */
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), var(--bg-color));
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* VSL Section */
.vsl-container {
  padding: 80px 20px;
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.vsl-wrapper {
  max-width: 900px;
  /* Ancho máximo del contenedor del video */
  width: 100%;
  background: linear-gradient(145deg, rgba(30, 41, 59, 1), rgba(15, 23, 42, 1));
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}

.vsl-placeholder {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* Ratio 16:9 */
  background-color: #0b1120;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.vsl-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.vsl-placeholder:hover .vsl-thumbnail {
  opacity: 0.5;
}

.play-button {
  position: absolute;
  background-color: rgba(37, 99, 235, 0.8);
  /* Accent color */
  color: white;
  border: none;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  font-size: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.play-button:hover {
  background-color: rgba(37, 99, 235, 1);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.8);
}

.vsl-cta-box {
  text-align: center;
}

.vsl-cta-text {
  font-size: 1.2em;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-weight: 500;
}

.vsl-cta-button {
  font-size: 1.1rem;
  padding: 15px 35px;
  background-color: #25D366;
  /* WhatsApp style or specific call to action */
  border-color: #25D366;
  box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.3);
}

.vsl-cta-button:hover {
  background-color: #1ea952;
  border-color: #1ea952;
  box-shadow: 0 4px 20px 0 rgba(37, 211, 102, 0.5);
}

.vsl-placeholder iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Services Grid (Bently Style) */
.services {
  padding: 100px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.service-card.highlight {
  border: 1px solid var(--accent-color);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.1) 0%, var(--surface-color) 100%);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

/* Portfolio Section */
.portfolio {
  padding: 100px 0;
  background: #0b1120;
  /* Slightly darker */
}

/* Project Card with Device Mockup */
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 120px;
}

.project-card.reverse {
  direction: rtl;
  /* Simple way to swap, ensure text aligns correctly */
}

.project-card.reverse .project-content {
  direction: ltr;
}

.project-visual {
  position: relative;
}

/* CSS MacBook Mockup */
.macbook-mockup {
  position: relative;
  background: #000;
  border-radius: 18px 18px 0 0;
  border: 2px solid #334155;
  padding: 2% 2% 0 2%;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.macbook-screen {
  background: #1e293b;
  aspect-ratio: 16/10;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: bold;
  font-size: 1.5rem;
}

.macbook-base {
  height: 12px;
  background: #334155;
  border-radius: 0 0 10px 10px;
  position: relative;
}

.macbook-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15%;
  height: 4px;
  background: #1e293b;
  border-radius: 0 0 4px 4px;
}

@media (max-width: 768px) {
  .sovereignty-card {
    padding: 25px !important;
  }

  .project-visual {
    height: 250px;
  }

  .macbook-mockup {
    width: 250px;
    height: 160px;
  }

  .macbook-screen {
    width: 200px;
    height: 125px;
    top: 15px;
  }

  .macbook-base {
    width: 250px;
    top: 150px;
  }
}

.project-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.project-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* CTA Section */
.cta-section {
  padding: 120px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-color) 0%, #1e293b 100%);
}

.cta-section h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Tech Transparency Badge */
.tech-transparency-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
}

.tech-transparency-badge .tech-logo {
  height: 20px;
  filter: grayscale(100%) brightness(200%);
}

/* Footer */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

/* Service Detail Page Styles (Restored & Refined) */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), var(--bg-color));
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.section {
  padding: 80px 0;
}

.service-detail {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 120px;
}

.service-detail.reverse {
  flex-direction: row-reverse;
}

.service-info {
  flex: 1;
}

.service-visual {
  flex: 1;
  height: 400px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #334155;
  font-weight: 800;
}

.service-info h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-info .lead {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin-top: 20px;
}

.feature-list li {
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Contact Form Styles */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: white;
  font-family: var(--font-main);
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Case Study Layout */
.case-study {
  margin-bottom: 120px;
  padding: 0 20px;
}

.project-header {
  margin-bottom: 40px;
}

h1,
h2,
h3,
h4 {
  color: var(--text-color);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.project-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 800px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: 4fr 6fr;
    gap: 60px;
  }
}

.challenge-box,
.solution-box,
.result-box {
  margin-bottom: 30px;
}

.project-content h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-stack-mini {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.tech-stack-mini span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.project-visuals {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.project-img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease;
}

.project-visuals:hover .project-img {
  transform: scale(1.02);
}

.sub-img {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 60%;
  border: 2px solid var(--accent-color);
  z-index: 10;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 80px;
  }

  .project-card.reverse {
    direction: ltr;
  }

  .navbar .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .navbar .nav-links.active {
    display: flex;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

  /* Make pill fit completely on mobile */
  .navbar {
    width: calc(100% - 20px);
    top: 10px;
    border-radius: 20px;
  }

  .navbar.scrolled {
    top: 5px;
  }

  .service-detail {
    flex-direction: column;
    text-align: center;
  }

  .service-detail.reverse {
    flex-direction: column;
  }

  .service-visual {
    margin-bottom: 30px;
    width: 100%;
    aspect-ratio: 16/9;
  }
}