/*
Theme Name: AGPHES Theme
Theme URI: https://asociacionagphes.org
Author: Pi-interactiva
Author URI: https://pi-interactiva.com
Description: Tema personalizado para la Asociación Guaviarense de Padres con Hijos en Situación de Discapacidad (AGPHES).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: agphes-theme
*/

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  /* Colores – extraídos del sitio estático */
  --color-primary:        #974723;
  --color-primary-light:  #B46A47;
  --color-primary-dark:   #5A2710;
  --color-secondary:      #fffae8;
  --color-secondary-light:#ffffff;
  --color-accent:         #E65100;
  --color-accent-hover:   #BF360C;
  --color-bg:             #FFF8E1;
  --color-surface:        #FFFFFF;
  --color-text-main:      #3E2723;
  --color-text-muted:     #6D4C41;
  --color-border:         #D7CCC8;

  /* Tipografías */
  --font-heading: "Montserrat", sans-serif;
  --font-body:    "Nunito", sans-serif;

  /* Espaciados */
  --spacing-xs:  0.5rem;
  --spacing-sm:  1rem;
  --spacing-md:  1.5rem;
  --spacing-lg:  2rem;
  --spacing-xl:  4rem;

  /* Bordes */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.10);

  /* Transición */
  --transition: all 0.3s ease;

  /* Header */
  --header-height: 72px;
  --topbar-height: 34px;
  --header-total: calc(var(--header-height) + var(--topbar-height));
}

/* ============================================================
   RESET BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary-dark);
}

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

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

button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  outline: none;
  font-weight: 600;
  transition: var(--transition);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section { padding: var(--spacing-xl) 0; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  color: #fff;
}

.btn-accent {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-accent:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.site-topbar {
  background-color: var(--color-primary-dark);
  color: #fff;
  font-size: 0.82rem;
  padding: 0.4rem 0;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-left a {
  color: rgba(255,255,255,0.88);
  font-family: var(--font-body);
  font-size: 0.82rem;
  transition: color 0.2s;
}
.topbar-left a:hover { color: #fff; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-right a {
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.topbar-right a:hover { color: #fff; }

:root {
  --topbar-height: 34px;
}

/* ============================================================
   HEADER / NAVEGACIÓN
   ============================================================ */
.site-header {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo img { height: 48px; width: auto; }
.site-logo:hover { opacity: 0.85; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-main);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.main-nav a:hover,
.main-nav a.current-menu-item {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.header-cta { display: flex; gap: 1rem; }

/* Menú móvil */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-main);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: #1F2937;
  color: #fff;
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p { color: #9CA3AF; margin-top: 1rem; line-height: 1.7; font-size: 0.9rem; }
.footer-brand .footer-nit { color: #6B7280; font-size: 0.8rem; margin-top: 0.5rem; }

.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1.25rem; font-family: var(--font-heading); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { color: #9CA3AF; font-size: 0.88rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--color-primary-light); }

.footer-contact p { color: #9CA3AF; font-size: 0.88rem; margin-bottom: 0.5rem; }

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p { color: #6B7280; font-size: 0.8rem; }
.footer-bottom a { color: var(--color-primary-light); }

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-center  { text-align: center; }
.text-muted   { color: var(--color-text-muted); }
.text-white   { color: #fff !important; }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }

/* ============================================================
   RESPONSIVE BASE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 64px; --topbar-height: 30px; }
  .topbar-left { gap: 1rem; font-size: 0.75rem; }
  .topbar-left a { font-size: 0.75rem; }

  .main-nav, .header-cta { display: none; }
  .mobile-toggle { display: block; }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-surface);
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
