/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES — DIO 552
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Space+Grotesk:wght@300..700&family=Noto+Serif+JP:wght@300;600&display=swap');

:root {
  /* Colors - Light Theme with Dark Charcoal Accents */
  --bg-primary: #F9F9F6;
  --bg-secondary: #FFFFFF;
  --bg-dark: #111111;
  --text-primary: #111111;
  --text-secondary: #4A4A4A;
  --text-muted: #888888;
  --text-light: #F9F9F6;
  --border-color: #E2E2DF;
  --border-dark: #111111;
  --error-color: #D94F30;
  --success-color: #2D6A4F;
  --overlay-bg: rgba(249, 249, 246, 0.85);
  --modal-bg: rgba(255, 255, 255, 0.98);
  
  /* Fonts */
  --font-title: 'Playfair Display', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-kanji: 'Noto Serif JP', serif;
  
  /* Layout */
  --grid-base: 80px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s ease-out;
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-dark);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Title Fonts */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-padding {
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}

.grid-brutalist {
  display: grid;
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.grid-cell {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 40px;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--bg-dark);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.btn-text {
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-bottom: 2px solid var(--border-color);
  cursor: pointer;
}

.btn-text:hover {
  border-bottom-color: var(--border-dark);
  padding-left: 8px;
}

/* ==========================================================================
   LOADING ANIMATION
   ========================================================================== */

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-logo {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

/* ==========================================================================
   HEADER (STICKY NAV)
   ========================================================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border-color);
  background-color: transparent;
  transition: var(--transition-smooth);
}

header.scrolled {
  background-color: var(--overlay-bg);
  backdrop-filter: blur(12px);
  height: 70px;
}

.logo {
  display: flex;
  align-items: baseline;
  font-size: 1.5rem;
}

.logo-main {
  font-family: var(--font-title);
  font-weight: 900;
}

.logo-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: 35px;
  list-style: none;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-cta {
  display: block;
}

.header-cta .btn {
  padding: 10px 24px;
  font-size: 0.7rem;
}

/* Mobile Menu Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1010;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  margin-bottom: 5px;
  transition: var(--transition-fast);
}

/* Mobile Navigation Fullscreen Open */
.nav-menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  list-style: none;
  transform: translateY(-100%);
  transition: var(--transition-smooth);
}

.nav-menu-mobile.active {
  transform: translateY(0);
}

.nav-menu-mobile a {
  font-family: var(--font-title);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/hero_bg_light.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.75;
  filter: contrast(95%) brightness(102%) saturate(90%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(249, 249, 246, 0.4) 0%, rgba(249, 249, 246, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-kanji {
  font-family: var(--font-kanji);
  font-size: 6rem;
  font-weight: 300;
  opacity: 0.08;
  margin-bottom: -30px;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 350;
  letter-spacing: -0.01em;
  margin-bottom: 15px;
  color: var(--text-primary);
  line-height: 1.1;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-scroll-btn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background-color: var(--border-dark);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background-color: var(--bg-primary);
  animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  80% { transform: translateY(330%); }
  100% { transform: translateY(330%); }
}

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

/* ==========================================================================
   PROYECTOS: LISTA DE FICHAS TÉCNICAS
   ========================================================================== */

.projects-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.filter-group {
  display: flex;
  gap: 20px;
  list-style: none;
}

.filter-btn {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  border-color: var(--border-dark);
}

/* Technical Sheet Layout (Split Screen) */
.project-list-container {
  display: flex;
  flex-direction: column;
  gap: 120px; /* Space between projects */
}

.project-technical-sheet {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
}

/* Left: Image Box */
.project-media-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: #EBEBE8;
  aspect-ratio: 1.5;
}

.project-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.project-media-box:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

/* Right: Technical Details */
.project-details-box {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.project-category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-secondary);
}

.project-title {
  font-size: 2.5rem;
  font-weight: 350;
  margin-top: -15px;
}

/* Technical Data Grid */
.technical-data-table {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border-color);
  margin-top: 10px;
}

.technical-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.technical-label {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.technical-value {
  font-weight: 500;
  color: var(--text-primary);
}

.project-concept {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-concept em {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: block;
  margin-top: 15px;
}

/* ==========================================================================
   ESTUDIO & SERVICIOS
   ========================================================================== */

.studio-grid {
  grid-template-columns: 1fr 1fr;
}

.studio-concept-text {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-primary);
}

.studio-desc-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Process Timeline */
.process-timeline {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-color);
}

.process-step {
  padding: 30px 20px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.process-step:last-child {
  border-right: none;
}

.step-num {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--text-muted);
  font-weight: 300;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Services section */
.services-grid {
  grid-template-columns: repeat(2, 1fr);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-kanji);
  font-size: 1.2rem;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 450;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.service-bullets {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-bullets li {
  position: relative;
  padding-left: 20px;
}

.service-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   DIARIO (BLOG)
   ========================================================================== */

.diary-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  transition: var(--transition-smooth);
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
  border-color: var(--border-dark);
}

.article-image {
  aspect-ratio: 1.6;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.article-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.article-card-title {
  font-size: 1.6rem;
  font-weight: 350;
  line-height: 1.3;
}

.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   CONTACTO & FORMULARIOS
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-title {
  font-size: 3.5rem;
  line-height: 1.1;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-channel {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.channel-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.channel-value {
  font-size: 1.1rem;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 25px;
  list-style: none;
}

.social-links a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.social-links a:hover {
  text-decoration: underline;
}

/* Brutalist Floating Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.form-group {
  position: relative;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  transition: var(--transition-fast);
}

.form-group.focus {
  border-bottom-color: var(--border-dark);
}

.form-label {
  position: absolute;
  left: 0;
  top: 15px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}

/* Floating Label Logic */
.form-group.focus .form-label,
.form-group.has-value .form-label {
  top: -15px;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.15em;
}

.form-input {
  width: 100%;
  padding: 10px 0;
  font-size: 0.95rem;
}

.form-select {
  width: 100%;
  padding: 10px 0;
  font-size: 0.95rem;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.checkbox-custom-container {
  display: block;
  position: relative;
  padding-left: 25px;
  cursor: pointer;
  user-select: none;
}

.checkbox-custom-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  border: 1px solid var(--border-dark);
  background-color: transparent;
  transition: var(--transition-fast);
}

.checkbox-custom-container:hover input ~ .checkmark {
  background-color: rgba(0,0,0,0.02);
}

.checkbox-custom-container input:checked ~ .checkmark {
  background-color: var(--bg-dark);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-custom-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-custom-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--text-light);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Status Notifications */
.form-notification {
  padding: 16px;
  font-size: 0.85rem;
  display: none;
}

.form-notification.error {
  display: block;
  background-color: rgba(217, 79, 48, 0.05);
  border-left: 3px solid var(--error-color);
  color: var(--error-color);
}

.form-notification.success {
  display: block;
  background-color: rgba(45, 106, 79, 0.05);
  border-left: 3px solid var(--success-color);
  color: var(--success-color);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 80px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.footer-logo {
  color: var(--text-light);
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 250px;
}

.footer-col-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text-light);
  padding-left: 4px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

/* Watermark 552 */
.footer-watermark {
  position: absolute;
  right: 40px;
  bottom: -20px;
  font-family: var(--font-title);
  font-size: 16rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.02);
  user-select: none;
  cursor: pointer;
  transition: color 0.8s ease;
}

.footer-watermark:hover {
  color: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   ADMIN PANELS (MODALS & FLOATING BARS)
   ========================================================================== */

/* Hidden elements by default */
.admin-only {
  display: none !important;
}

body.admin-mode-active .admin-only {
  display: inline-flex !important;
}

body.admin-mode-active .admin-only-block {
  display: block !important;
}

body.admin-mode-active .admin-only-flex {
  display: flex !important;
}

/* Admin Top Bar */
.admin-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Move header down when admin bar is visible */
body.admin-mode-active header {
  top: 40px;
}

body.admin-mode-active main {
  margin-top: 40px;
}

.admin-logout-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 10px;
  font-size: 0.65rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-logout-btn:hover {
  border-color: var(--text-light);
  background-color: var(--text-light);
  color: var(--text-primary);
}

/* Edit & Admin floating buttons */
.admin-action-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  border: 1px dashed var(--border-dark);
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.02);
}

/* Modal Overlay Base */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Box */
.modal-box {
  background-color: var(--modal-bg);
  border: 1px solid var(--border-dark);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 50px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.1);
  transform: translateY(30px);
  transition: var(--transition-smooth);
  position: relative;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 2.2rem;
  margin-bottom: 30px;
  font-weight: 350;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1100px) {
  .project-technical-sheet {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .projects-filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .studio-grid, .services-grid, .diary-grid, .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .process-timeline {
    grid-template-columns: 1fr 1fr;
  }
  
  .process-step:nth-child(2) {
    border-right: none;
  }
  
  .process-step:nth-child(3) {
    border-top: 1px solid var(--border-color);
  }
  
  .process-step:nth-child(4) {
    border-top: 1px solid var(--border-color);
    border-right: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --grid-base: 40px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  header {
    padding: 0 20px;
  }
  
  .nav-links, .header-cta {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .process-timeline {
    grid-template-columns: 1fr;
  }
  
  .process-step {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .process-step:last-child {
    border-bottom: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-watermark {
    font-size: 8rem;
  }
  
  .modal-box {
    padding: 30px 20px;
  }
  
  .filter-group {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ==========================================================================
   PROYECTO DETALLE Y GALERÍA (proyecto.html)
   ========================================================================== */

.back-link-container {
  margin-top: calc(var(--header-height) + 20px);
  margin-bottom: 30px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.back-link:hover {
  transform: translateX(-5px);
}

.project-details-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  margin-bottom: 60px;
}

.project-detail-main-img {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 1.6;
}

.project-detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}

.gallery-section {
  padding-top: 60px;
  border-top: 1px solid var(--border-color);
  margin-bottom: 80px;
}

.gallery-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
}

/* Gallery Brutalist Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.gallery-card {
  position: relative;
  border: 1px solid var(--border-color);
  background-color: #EBEBE8;
  aspect-ratio: 1.4;
  overflow: hidden;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.gallery-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

/* Gallery Photo Delete Button (Admin Only) */
.photo-delete-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.btn-delete-photo {
  background-color: var(--bg-primary);
  color: var(--error-color);
  border: 1px solid var(--error-color);
  padding: 6px 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-delete-photo:hover {
  background-color: var(--error-color);
  color: var(--text-light);
}

/* Admin Upload Panel */
.gallery-admin-panel {
  border: 1px dashed var(--border-dark);
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.02);
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 1px dashed var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.upload-zone:hover {
  border-color: var(--border-dark);
  background-color: rgba(0, 0, 0, 0.01);
}

.upload-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Lightbox Overlay */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* Lightbox UI Buttons */
.lightbox-btn {
  position: absolute;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10010;
  user-select: none;
}

.lightbox-btn:hover {
  color: #FFFFFF;
}

.lightbox-btn-close {
  top: -50px;
  right: 0px;
  font-size: 2.5rem;
}

.lightbox-btn-prev {
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn-next {
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
}

/* Responsive adjustments for project detail */
@media (max-width: 1100px) {
  .project-details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .back-link-container {
    margin-top: calc(var(--header-height) + 10px);
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .lightbox-btn-prev {
    left: 10px;
    background-color: rgba(17,17,17,0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
  }
  .lightbox-btn-next {
    right: 10px;
    background-color: rgba(17,17,17,0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
  }
  .lightbox-btn-close {
    top: 15px;
    right: 15px;
    background-color: rgba(17,17,17,0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
  }
}

