/*
================================================================================
Emilio Nahuel Pattini - Personal Website CSS
================================================================================

Global styles for the portfolio:
- Dark theme base (#1a1a2e) with cyan accents (#0fbcf9)
- Responsive typography using clamp()
- Flexbox & Grid for layouts
- Mobile-first navbar with hamburger menu
- Search input expansion animation
- Slider/carousel styling
- Accessibility improvements (focus states, contrast)
- Print-friendly adjustments (if needed later)

Last updated: January 2026

© 2026 Emilio Nahuel Pattini
All rights reserved. See LICENSE for details.

================================================================================
*/

/* ==================== GLOBAL RESET & BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif; /* Fallback font */
  background-color: #f5f5f5;
  color: #333;
}

/* ==================== TYPOGRAPHY & FONT IMPORTS ==================== */
/* Import Google Fonts: Inter (body) and Lora (headings) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Lora:wght@600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.2vw, 18px); /* Responsive font size */
  line-height: 1.6;
  color: #333;
  background-color: #ffffff; /* Main content background */
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: 'Lora', serif;
  color: #000;
  margin-top: clamp(1rem, 5vw, 4rem);
  margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

h1 {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
}

h3 {
  font-weight: 600;
  font-size: clamp(18px, 2.5vw, 26px);
}

p {
  font-weight: 400;
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
  color: #333;
}

a {
  color: #40e0d0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==================== NAVBAR ==================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1a1a2e;
  padding: 1rem 2rem;
  color: #fff;
}

.logo {
  flex: 0 0 auto;
  width: 120px; /* Adjust based on actual logo width */
}

.logo-img {
  height: 100px;
  vertical-align: middle;
}

/* Hamburger Menu Icon - Hidden by default (desktop) */
.hamburger {
  display: none;
  font-size: 1.8rem;
  color: #ffffff;
  cursor: pointer;
}

/* Nav Links (centered in desktop) */
.nav-links {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto;
  list-style: none;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #0fbcf9;
}

/* Dropdown Menu */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1a2e;
  list-style: none;
  padding: 0.5rem 0;
  border-radius: 4px;
}

.dropdown li {
  width: 180px;
}

.dropdown a {
  display: block;
  padding: 0.5rem 1rem;
}

/* Show dropdown on hover in desktop */
@media (min-width: 769px) {
  .nav-links li:hover .dropdown {
    display: block;
  }
}

/* Search Box (desktop) */
.search-box {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 180px;
  min-width: 180px;
  position: relative;
  gap: 0.3rem;
}

.search-box input {
  width: 100px;
  max-width: 140px;
  transition: width 0.3s ease;
}

.search-box input:focus,
.search-box input.expanded {
  width: 140px;
}

.search-box button:hover {
  background-color: #08a4d0;
}

/* Search Results Dropdown */
#search-results {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: #fff;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

#search-results li {
  padding: 0;
  margin: 0;
  cursor: pointer;
}

#search-results li:hover {
  background: #f0f0f0;
}

#search-results a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
}

#search-results mark {
  background: #ffeb3b;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ==================== RESPONSIVE MOBILE STYLES ==================== */
@media (max-width: 768px) {
  .navbar {
    justify-content: flex-start;
    padding: 0.4rem 0.6rem; 
    position: relative;
    flex-wrap: nowrap;
    gap: 0.2rem; /* Espacio muy pequeño entre elementos */
    max-width: 100%;
    overflow: visible; /* Corta cualquier desborde visual */
  }

  .logo-img {
    height: 40px;
    transform: scale(2.3);
    transform-origin: left;
    flex-shrink: 0;
  }

  .search-box {
    order: 2;
    margin-left: auto;
    flex: 0 1 auto;
  }

  .search-box input {
    width: 50px;
    padding: 0.25rem;
    font-size: 0.8rem;
    transition: width 0.3s ease;
  }

  .search-box input:focus {
    width: 110px;
    margin-right: 0.5rem;
  }

  .search-box button {
    flex-shrink: 0;
    padding: 0.25rem;
    font-size: 0.9rem;
    margin-left: 0.3rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
  }

  #search-results {
    width: 100%;
    left: 0;
    right: 0;
  }

  .hamburger {
    display: block;          /* Only visible on mobile */
    order: 3;
    flex: 0 0 auto;
    margin-left: 0.5rem;
  }

  .nav-links {
      display: none; 
      flex-direction: column;
      background-color: #1a1a2e;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      padding: 1rem;
      z-index: 1000; 
      box-sizing: border-box;
    }

  .nav-links.active {
    display: flex;
    background: #1a1a2e; 
    z-index: 9999;
    top: 100%; 
    left: 0;
    width: 100%;
    position: absolute;
  }

  .nav-links li {
    margin: 1rem 0;
  }

  .dropdown {
    position: static;
    background-color: #2a2a3e;
    padding-left: 1rem;
    display: none;
  }

  .nav-links li.open .dropdown {
    display: block;
  }
}

/* ==================== HERO & INTRO SECTIONS ==================== */
.hero,
.intro {
  text-align: center;
  padding: 4rem 2rem;
}

.hero h1,
.intro h1 {
  font-size: 2.5rem;
  color: #1a1a2e;
}

.hero p,
.intro p {
  font-size: 1.2rem;
  margin-top: 1rem;
  color: #555;
}

/* ==================== FOOTER ==================== */
footer {
  background-color: #1a1a2e;
  color: #ffffff;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-links a,
.footer-social a {
  color: #0fbcf9;
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-links a:hover,
.footer-social a:hover {
  text-decoration: underline;
}

.credits {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 1rem;
}

/* ==================== SLIDER / CAROUSEL ==================== */
.slider {
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-height: 400px;
}

.slide {
  text-align: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.slide img,
.image-area img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 1rem;
}

.slide p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
  padding-top: 1rem;
}

.prev, .next {
  position: absolute;
  top: 150px;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
}

.prev:hover, .next:hover {
  background: rgba(0,0,0,0.7);
}

.prev { left: 10px; }
.next { right: 10px; }

.dots {
  text-align: center;
  margin-top: 1rem;
}

.dots button {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
}

.dots button.active {
  background: #333;
}

/* ==================== MISCELLANEOUS ==================== */
.profile-photo img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto 2rem;
}

ul {
  list-style-position: inside;
  text-align: center;
  padding: 0;
}

/* ==================== Language Selector ==================== */

.language-selector {
  flex: 0 0 auto; 
  margin-left: 0.5rem; 
  margin-right: 0;
}

#language-select {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem; 
  background: #1a1a2e;
  color: #fff;
  border: 1px solid #0fbcf9;
  border-radius: 4px;
  cursor: pointer;
}

/* Desktop */
@media (min-width: 769px) {
  .language-selector {
    margin-left: auto; 
    margin-right: 1rem; /
  }

  #language-select {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .language-selector {
    order: 1; 
    margin-left: 0.2rem;
    margin-right: 0.2rem;
  }

  #language-select {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem; 
    min-width: 30px; 
  }

  .search-box {
    order: 2;
    margin-left: 0.2; 
    margin-right: 0rem;
    flex: 0 0 auto;
  }

  .search-box input {
    width: 40px; 
    padding: 0.2rem;
  }

  .search-box input:focus {
    width: 80px; 
    margin-right: 0.2rem;
  }

  .search-box button {
    padding: 0.15rem;
    font-size: 0.8rem;
    margin-left: 0.15rem;
  }

  .hamburger {
    order: 3;
    margin-left: 0rem;
    margin-right: 0.1rem;
    font-size: 1.5rem; 
  }
}

@media (max-width: 400px) {
  
  .navbar {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.2rem;
    box-sizing: border-box;
    overflow: visible;
  }

  .logo-img {
    transform: scale(1.6);
    transform-origin: left;
    flex-shrink: 0;
  }

  .language-selector,
  .search-box {
    flex: 1 1 auto;        /* ambos comparten el espacio intermedio */
    margin: 0 0.1rem;
    min-width: 0;          /* permite que se encojan sin empujar */
    flex-shrink: 1;
    transition: width 0.3s ease;   /* animación suave */
  }

  #language-select {
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
  }

  .search-box input {
    width: 40px;           /* ocupa el espacio disponible */
    transition: width 0.3s ease;
  }

  .search-box input:focus {
    width: 90px;                   /* expandido al enfocar */
    margin-right: 0.2rem;
  }


  .hamburger {
    flex-shrink: 0;
    margin: 0;
    font-size: 1.4rem;
  }
}

/* ==================== Fallback container /index.html ==================== */

/* Fallback container */
.fallback-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f7f7f7;
  padding: 20px;
}

/* Box */
.fallback-box {
  background: white;
  padding: 32px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  max-width: 420px;
  text-align: center;
  font-family: system-ui, sans-serif;
}

/* Title */
.fallback-box h2 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  color: #222;
}

/* Paragraph */
.fallback-box p {
  margin-bottom: 24px;
  color: #555;
  font-size: 1rem;
}

/* Buttons */
.fallback-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-btn {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  background: #efefef;
  text-decoration: none;
  font-size: 1.1rem;
  color: #222;
  transition: background 0.2s, transform 0.15s;
}

.lang-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}




