/*
Theme Name: ASTROCOSMICO
Theme URI: https://astrocosmico.com
Author: Cristóbal Marroquín
Author URI: https://astrocosmico.com
Description: Tema oficial de ASTROCOSMICO — Agencia creativa, portafolio profesional y tienda en línea. Compatible con Elementor y WooCommerce.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: astrocosmico
Tags: elementor, woocommerce, one-page, portfolio, dark-mode, creative

Elementor tested up to: 3.22
Elementor Pro tested up to: 3.22
WC tested up to: 8.5
*/

/* =========================================================
   ASTROCOSMICO — Global Styles
   ========================================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand colors */
  --ac-primary:       #CAFF33;
  --ac-secondary:     #FF3CAC;
  --ac-accent:        #00F5FF;
  --ac-violet:        #784CFB;
  --ac-yellow:        #FFE600;

  /* Light theme */
  --ac-bg:            #FAFAFA;
  --ac-fg:            #0A0A0A;
  --ac-surface:       #FFFFFF;
  --ac-border:        rgba(0,0,0,0.08);
  --ac-muted:         #6B7280;
  --ac-muted-bg:      #F3F4F6;

  /* Typography */
  --ac-font-display:  'Montserrat', sans-serif;
  --ac-font-body:     'Inter', 'Poppins', sans-serif;

  /* Radius */
  --ac-radius-sm:     8px;
  --ac-radius-md:     16px;
  --ac-radius-lg:     24px;
  --ac-radius-full:   9999px;

  /* Shadows */
  --ac-shadow:        0 4px 24px rgba(0,0,0,0.06);
  --ac-shadow-lg:     0 8px 48px rgba(0,0,0,0.12);
  --ac-glow-primary:  0 0 40px rgba(202,255,51,0.35);
  --ac-glow-pink:     0 0 40px rgba(255,60,172,0.35);

  /* Transitions */
  --ac-transition:    all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Dark mode ---------- */
html.dark,
.dark {
  --ac-bg:        #0B0F1A;
  --ac-fg:        #F1F5F9;
  --ac-surface:   #111827;
  --ac-border:    rgba(255,255,255,0.08);
  --ac-muted:     #9CA3AF;
  --ac-muted-bg:  #1F2937;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ac-font-body);
  background-color: var(--ac-bg);
  color: var(--ac-fg);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--ac-font-display);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ac-fg);
}

/* ---------- Elementor Overrides ---------- */
.elementor-page { background-color: var(--ac-bg); }
.elementor-section { transition: background-color 0.3s ease; }
.e-con, .elementor-container { max-width: 1280px; }

/* ---------- Utility Classes (usables en Elementor Custom CSS) ---------- */
.ac-gradient-text {
  background: linear-gradient(135deg, var(--ac-primary), var(--ac-secondary), var(--ac-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ac-glow-primary { box-shadow: var(--ac-glow-primary); }
.ac-glow-pink    { box-shadow: var(--ac-glow-pink); }
.ac-surface      { background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg); }

/* ---------- Navbar (header.php) ---------- */
#ac-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 20px 0;
  transition: var(--ac-transition);
}
#ac-navbar.scrolled {
  background: rgba(var(--ac-bg-rgb, 250,250,250), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ac-border);
  padding: 12px 0;
}
.dark #ac-navbar.scrolled { background: rgba(11,15,26,0.85); }
#ac-navbar .nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ac-logo {
  font-family: var(--ac-font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--ac-fg);
}
.ac-logo span { color: var(--ac-primary); }
.ac-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.ac-nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ac-fg);
  opacity: 0.8;
  transition: var(--ac-transition);
}
.ac-nav-links a:hover { color: var(--ac-primary); opacity: 1; }
.ac-nav-actions { display: flex; align-items: center; gap: 8px; }
.ac-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--ac-radius-full);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ac-fg);
  transition: var(--ac-transition);
}
.ac-icon-btn:hover { background: rgba(202,255,51,0.1); color: var(--ac-primary); }
.ac-cart-count {
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ac-primary);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.ac-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--ac-bg);
}
.ac-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(202,255,51,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 70% 60%, rgba(255,60,172,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0,245,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.ac-hero-title {
  font-family: var(--ac-font-display);
  font-weight: 900;
  font-size: clamp(56px, 12vw, 160px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}
.ac-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--ac-radius-full);
  background: rgba(202,255,51,0.12);
  color: var(--ac-primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* ---------- Section base ---------- */
.ac-section {
  padding: 100px 0;
  position: relative;
}
.ac-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ac-primary);
  margin-bottom: 16px;
}
.ac-section-title {
  font-family: var(--ac-font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 20px;
}
.ac-section-sub {
  color: var(--ac-muted);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.ac-card {
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-lg);
  padding: 32px;
  transition: var(--ac-transition);
}
.ac-card:hover {
  border-color: var(--ac-primary);
  box-shadow: 0 0 0 1px var(--ac-primary), var(--ac-glow-primary);
  transform: translateY(-4px);
}
.ac-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--ac-radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* ---------- Buttons ---------- */
.ac-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--ac-radius-full);
  font-family: var(--ac-font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--ac-transition);
  text-decoration: none;
}
.ac-btn-primary {
  background: var(--ac-fg);
  color: var(--ac-bg);
}
.ac-btn-primary:hover {
  background: var(--ac-primary);
  color: #000;
  box-shadow: var(--ac-glow-primary);
}
.ac-btn-outline {
  border-color: var(--ac-border);
  color: var(--ac-fg);
  background: transparent;
}
.ac-btn-outline:hover {
  border-color: var(--ac-primary);
  color: var(--ac-primary);
}

/* ---------- Grid layouts ---------- */
.ac-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ac-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ac-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) {
  .ac-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ac-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ac-grid-2, .ac-grid-3, .ac-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Portfolio ---------- */
.ac-portfolio-item {
  position: relative;
  border-radius: var(--ac-radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--ac-muted-bg);
}
.ac-portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ac-portfolio-item:hover img { transform: scale(1.05); }
.ac-portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  opacity: 0;
  transition: var(--ac-transition);
  display: flex; align-items: flex-end; padding: 24px;
}
.ac-portfolio-item:hover .ac-portfolio-overlay { opacity: 1; }

/* ---------- Shop / WooCommerce ---------- */
.woocommerce ul.products li.product {
  background: var(--ac-surface) !important;
  border: 1px solid var(--ac-border) !important;
  border-radius: var(--ac-radius-lg) !important;
  overflow: hidden;
  transition: var(--ac-transition) !important;
}
.woocommerce ul.products li.product:hover {
  border-color: var(--ac-primary) !important;
  box-shadow: var(--ac-glow-primary) !important;
  transform: translateY(-4px);
}
.woocommerce ul.products li.product .price { color: var(--ac-primary) !important; font-weight: 900; }
.woocommerce a.button, .woocommerce button.button {
  background: var(--ac-fg) !important;
  color: var(--ac-bg) !important;
  border-radius: var(--ac-radius-full) !important;
  font-weight: 700 !important;
  transition: var(--ac-transition) !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover {
  background: var(--ac-primary) !important;
  color: #000 !important;
  box-shadow: var(--ac-glow-primary) !important;
}

/* ---------- CV / Timeline ---------- */
.ac-timeline { position: relative; padding-left: 32px; }
.ac-timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--ac-primary), var(--ac-secondary));
}
.ac-timeline-item { position: relative; margin-bottom: 40px; }
.ac-timeline-item::before {
  content: '';
  position: absolute;
  left: -38px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ac-primary);
  box-shadow: 0 0 0 3px var(--ac-bg), 0 0 0 5px var(--ac-primary);
}
.ac-timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ac-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.ac-timeline-title {
  font-family: var(--ac-font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 4px;
}
.ac-timeline-sub { color: var(--ac-muted); font-size: 0.875rem; }

/* ---------- Contact Form (CF7 / WPForms) ---------- */
.ac-contact-form input,
.ac-contact-form textarea,
.ac-contact-form select,
.wpcf7-form input,
.wpcf7-form textarea {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--ac-radius-md);
  border: 1.5px solid var(--ac-border);
  background: var(--ac-surface);
  color: var(--ac-fg);
  font-family: var(--ac-font-body);
  font-size: 0.95rem;
  transition: var(--ac-transition);
  outline: none;
  margin-bottom: 16px;
}
.ac-contact-form input:focus,
.ac-contact-form textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: var(--ac-primary);
  box-shadow: 0 0 0 3px rgba(202,255,51,0.15);
}

/* ---------- Footer ---------- */
.ac-footer {
  background: var(--ac-fg);
  color: var(--ac-bg);
  padding: 60px 0 32px;
}
.dark .ac-footer { background: #000; }
.ac-footer a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.ac-footer a:hover { color: var(--ac-primary); }

/* ---------- Dark Mode Toggle ---------- */
#ac-theme-toggle svg.sun { display: none; }
#ac-theme-toggle svg.moon { display: block; }
html.dark #ac-theme-toggle svg.sun { display: block; }
html.dark #ac-theme-toggle svg.moon { display: none; }

/* ---------- Animations ---------- */
@keyframes ac-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes ac-pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(202,255,51,0.3); }
  50%       { box-shadow: 0 0 50px rgba(202,255,51,0.6); }
}
@keyframes ac-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.ac-float    { animation: ac-float 4s ease-in-out infinite; }
.ac-glow-anim { animation: ac-pulse-glow 2s ease-in-out infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .ac-nav-links { display: none; }
  .ac-section { padding: 60px 0; }
}
