/*
Theme Name: Adicción-a
Theme URI: https://adiccion-a.com
Description: Tema personalizado para Adiccion-a.com — información sobre adicciones
Author: T-03
Version: 1.0
Text Domain: adiccion-a
*/

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

:root {
  --purple-dark: #4a1942;
  --purple-mid: #6b2d7b;
  --purple-light: #8e4b9e;
  --crimson: #8b1a1a;
  --crimson-light: #a52a2a;
  --bg-light: #faf8fc;
  --bg-alt: #f3edf7;
  --text-dark: #2d2d2d;
  --text-muted: #666;
  --white: #fff;
  --shadow: 0 2px 15px rgba(74,25,66,0.08);
  --shadow-hover: 0 8px 30px rgba(74,25,66,0.15);
  --radius: 8px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.3;
  font-weight: 700;
}

a { color: var(--purple-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--crimson); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER & NAV ===== */
.site-header {
  background: var(--purple-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white) !important;
  padding: 1rem 0;
  text-decoration: none;
}

.site-logo:hover { color: #e8c6f0 !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

.main-nav { display: flex; align-items: center; list-style: none; gap: 0; }
.main-nav > li { position: relative; }
.main-nav > li > a,
.main-nav > li > .dropdown-toggle {
  display: block;
  color: #f0e6f6;
  padding: 1.1rem 1rem;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Lato', sans-serif;
  transition: background var(--transition);
}

.main-nav > li > a:hover,
.main-nav > li > .dropdown-toggle:hover,
.main-nav > li:hover > .dropdown-toggle {
  background: var(--purple-mid);
  color: var(--white);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--purple-dark);
  min-width: 240px;
  border-top: 3px solid var(--purple-mid);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all var(--transition);
  list-style: none;
  z-index: 100;
  border-radius: 0 0 var(--radius) var(--radius);
}

.main-nav > li:hover > .dropdown-menu,
.main-nav > li.open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.7rem 1.2rem;
  color: #f0e6f6;
  font-size: 0.9rem;
  transition: background var(--transition);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-menu a:hover {
  background: var(--purple-mid);
  color: var(--white);
}

.dropdown-menu li:last-child a { border-bottom: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--crimson) 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== CONTENT ===== */
.content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.content-wrap h1 {
  font-size: 2.4rem;
  color: var(--purple-dark);
  margin-bottom: 1.5rem;
}

.content-wrap h2 {
  font-size: 1.8rem;
  color: var(--purple-dark);
  border-bottom: 2px solid var(--purple-mid);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1rem;
}

.content-wrap h3 {
  font-size: 1.35rem;
  color: var(--crimson);
  margin: 2rem 0 0.8rem;
}

.content-wrap h4 {
  font-size: 1.15rem;
  color: var(--purple-mid);
  margin: 1.5rem 0 0.6rem;
}

.content-wrap p { margin-bottom: 1.2rem; }

.content-wrap ul, .content-wrap ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.content-wrap li { margin-bottom: 0.4rem; }

.content-wrap blockquote {
  border-left: 4px solid var(--purple-mid);
  background: var(--bg-alt);
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.content-wrap img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.content-wrap figure { margin: 2rem 0; }
.content-wrap figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.content-wrap th {
  background: var(--purple-dark);
  color: var(--white);
  padding: 0.8rem 1rem;
  text-align: left;
  font-family: 'Lato', sans-serif;
}
.content-wrap td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e8e0ed;
}
.content-wrap tr:nth-child(even) { background: var(--bg-alt); }

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--purple-mid);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--text-dark);
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--text-dark);
}

.card h3 {
  color: var(--purple-dark);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-alt { background: var(--bg-alt); }
.section-padding { padding: 3rem 0; }
.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--purple-dark);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== FAQ ===== */
.faq-item { margin-bottom: 1.8rem; }
.faq-item h3 { font-size: 1.1rem; color: var(--purple-dark); margin-bottom: 0.4rem; }
.faq-item p { color: var(--text-muted); }

/* ===== RELATED ARTICLES ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1.5rem 0;
}

.related-link {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--white);
  border-left: 4px solid var(--purple-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  font-weight: 700;
  color: var(--purple-dark);
}
.related-link:hover {
  transform: translateX(4px);
  color: var(--crimson);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--purple-dark);
  color: #ccc;
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.site-footer a { color: #e8c6f0; }
.site-footer a:hover { color: var(--white); }
.site-footer p { font-size: 0.85rem; line-height: 1.6; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }

/* ===== SIDEBAR ===== */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.sidebar { padding-top: 0.5rem; }
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.sidebar-widget h4 {
  color: var(--purple-dark);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-alt);
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { margin-bottom: 0.5rem; }
.sidebar-widget a { font-size: 0.9rem; }

/* ===== TAGS ===== */
.tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
}
.tag-purple { background: var(--purple-mid); }
.tag-crimson { background: var(--crimson); }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .page-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  }
  .main-nav.active { display: flex; }
  .main-nav > li > a,
  .main-nav > li > .dropdown-toggle {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    background: rgba(0,0,0,0.15);
  }
  .main-nav > li.open > .dropdown-menu { display: block; }
  .dropdown-menu a { padding-left: 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .content-wrap h1 { font-size: 1.8rem; }
  .content-wrap h2 { font-size: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
