/*
Theme Name: Ibizia Minimal
Theme URI: https://ibizia.local/
Author: nacanet
Description: Theme minimalista para Ibizia, compatible con plugins de directorio.
Version: 2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ibizia-minimal
Tags: minimal, directory, custom-header, dark
*/

/* ── Variables — Ibizia Brand Guidelines v4.1 (Light Mode) ───── */
:root {
  --bg:           #F5F0EB;
  --bg-secondary: #ECE5DC;
  --surface:      #ffffff;
  --border:       #E0E0E0;
  --text:         #0D0D0D;
  --text-muted:   #828282;
  --text-light:   #484848;
  --accent:       #E8396A;
  --accent-hover: #C02050;
  --input-bg:     #ffffff;
  --input-border: #E0E0E0;
  --input-focus:  #E8396A;
  --btn-bg:       #E8396A;
  --btn-text:     #F5F0EB;
  --shadow-sm:    0 1px 2px 0 rgba(13, 13, 13, 0.05);
  --shadow-md:    0 4px 6px -1px rgba(13, 13, 13, 0.1), 0 2px 4px -1px rgba(13, 13, 13, 0.06);
  --shadow-lg:    0 10px 15px -3px rgba(13, 13, 13, 0.1), 0 4px 6px -2px rgba(13, 13, 13, 0.05);
  --font-primary:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Space Mono', 'Courier New', monospace;
}

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

/* ── Base ───────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Site Header ────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.site-title a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.site-title a:hover {
  color: var(--accent);
}

/* ── Menu Toggle (Mobile) ───────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ── Main Navigation ────────────────────────────────────────── */
.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  border-radius: 0.375rem;
}

/* Minimalist icon-only nav items (Inicio, Directorios) */
.nav-icon {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-link:hover .nav-icon,
.nav-label:hover .nav-icon {
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(232, 57, 106, 0.08);
}

/* ── Submenu (Directorios) ──────────────────────────────────── */
.nav-group {
  position: relative;
}

.nav-label {
  display: inline-block;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.nav-label:hover {
  color: var(--accent);
  background: rgba(232, 57, 106, 0.08);
}

.nav-label::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.nav-group:hover .nav-label::after {
  transform: rotate(45deg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0.5rem 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.nav-group:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li {
  list-style: none;
}

.submenu .nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  width: 100%;
  text-align: left;
  border-radius: 0;
  color: var(--text);
}

.submenu .nav-link:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .header-container {
    padding: 1rem 1.5rem;
  }

  .main-navigation {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: var(--surface);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .main-navigation.active {
    transform: translateX(0);
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding-top: 80px;
  }

  .nav-menu > li {
    width: 100%;
  }

  .nav-link,
  .nav-label {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 0;
    text-align: left;
  }

  .submenu {
    position: static;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
    background: var(--bg-secondary);
    transform: none;
    transition: all 0.2s ease;
    margin: 0;
  }

  .nav-group:hover .submenu,
  .nav-group.open .submenu {
    opacity: 1;
    visibility: visible;
    height: auto;
  }

  .submenu .nav-link {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
  }
}

/* ── Main Content ───────────────────────────────────────────– */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

/* ── Page Title — Ibizia type scale ───────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.eyebrow,
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Forms ──────────────────────────────────────────────────– */
input,
textarea,
select {
  font-family: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(232, 57, 106, 0.1);
}

/* ── Buttons ────────────────────────────────────────────────– */
button,
.button,
input[type="submit"] {
  padding: 0.75rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ── Footer ────────────────────────────────────────────────– */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: 4rem;
}

/* ── Links ──────────────────────────────────────────────────– */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* ── Utility ────────────────────────────────────────────────– */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 1.5rem;
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 1.5rem;
  }
}

/* ── Artist Directory plugin coexistence ────────────────────── */

/* Preserve dark background when plugin adds body classes */
body.ad-nav-active {
  background: var(--bg) !important;
}

/* Login/home page: never show plugin nav there */
.page-template-page-home-ibizia #ad-scope {
  display: none !important;
}

/* Push page content below the plugin's sticky nav */
body.ad-nav-active .ibizia-archive-wrap,
body.ad-nav-active .ibizia-single-wrap,
body.ad-nav-active .ad-artist-single-wrap,
body.ad-nav-active .ad-account-wrap {
  padding-top: 0;
}

/* Allow scroll on plugin inner pages */
body.ad-nav-active {
  overflow: auto;
}

/* ── Messages ────────────────────────────────────────────── */
.auth-message {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-message--error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-message--success {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
