/*
Theme Name: Proyecto
Theme URI: https://example.com
Author: Proyecto
Author URI: https://example.com
Description: Tema WordPress nativo para el proyecto con diseño original y contenido compatible.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: buynewlink
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =========================================================
   1. VARIABLES CSS GLOBALES
   ========================================================= */
:root {
  --primary: #2563EB;
  --secondary: #0F172A;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --text: #111827;
  --text-light: #6B7280;
  --success: #14B8A6;
  --danger: #EF4444;
  --shadow-small: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-medium: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-large: 0 10px 15px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-lg: 20px;
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   2. ESTILOS GLOBALES
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

a {
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
}

/* =========================================================
   3. TIPOGRAFÍA
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

h2 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

h3 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

h4 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 14px;
}

p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* =========================================================
   4. CONTENEDOR
   ========================================================= */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 80px;
}

@media (max-width: 1024px) {
  .container {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* =========================================================
   5. HEADER STICKY
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 78px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-small);
  transition: all var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-medium);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding .site-title {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

/* =========================================================
   6. NAVEGACIÓN
   ========================================================= */
.site-navigation {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.site-navigation ul {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-navigation a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color var(--transition);
  position: relative;
}

.site-navigation a:hover {
  color: var(--primary);
}

.site-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.site-navigation a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .site-navigation {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

/* =========================================================
   7. BOTONES
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
}

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

.btn-secondary:hover {
  background: var(--background);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.btn:active {
  transform: scale(0.98);
}

/* =========================================================
   8. TARJETAS
   ========================================================= */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-small);
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-large);
  border-color: var(--primary);
}

/* =========================================================
   9. HERO
   ========================================================= */
.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--background) 0%, rgba(37, 99, 235, 0.05) 100%);
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* =========================================================
   10. GRID
   ========================================================= */
.grid {
  display: grid;
  gap: 32px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   11. SECCIONES
   ========================================================= */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  margin-bottom: 16px;
}

.section-title p {
  font-size: 20px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================================
   12. FOOTER
   ========================================================= */
.site-footer {
  background: var(--secondary);
  color: white;
  padding: 60px 0 20px;
  margin-top: 100px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-section h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* =========================================================
   13. ANIMACIONES
   ========================================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

.fade-in {
  animation: fadeIn var(--transition) ease-out;
}

.slide-up {
  animation: slideUp var(--transition) ease-out;
}

.slide-down {
  animation: slideDown var(--transition) ease-out;
}

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 26px; }
}

@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  p { font-size: 16px; }

  .btn {
    height: 48px;
    padding: 0 24px;
    font-size: 14px;
  }

  .section {
    padding: 60px 0;
  }
}

/* =========================================================
   15. ACCESIBILIDAD
   ========================================================= */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   16. UTILIDADES
   ========================================================= */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

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

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }

.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.mb-60 { margin-bottom: 60px; }

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
