/*
Theme Name: CCA Estrela de Marín
Theme URI: https://www.estrelademarin.gal
Description: Tema personalizado para o Centro Comercial Abierto Estrela de Marín con deseño moderno, responsive e optimizado para o club de fidelización Comercio de Marín.
Version: 1.0.0
Author: Manus
Author URI: https://manus.im
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cca-estrela-marin
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ============================================
   RESET E VARIABLES GLOBAIS
   ============================================ */

:root {
  --primary-color: #1a2e4a;
  --primary-dark: #0f1f34;
  --primary-light: #2d3f5a;
  --secondary-color: #2563EB;
  --accent-color: #F59E0B;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8f9fa;
  --border-color: #e5e7eb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ============================================
   TIPOGRAFÍA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

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

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

/* ============================================
   CONTAINER E LAYOUT
   ============================================ */

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

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 12; }
.col-4 { grid-column: span 12; }
.col-3 { grid-column: span 12; }

@media (min-width: 768px) {
  .col-6 { grid-column: span 6; }
  .col-4 { grid-column: span 4; }
  .col-3 { grid-column: span 3; }
}

@media (min-width: 1024px) {
  .col-6 { grid-column: span 6; }
  .col-4 { grid-column: span 4; }
  .col-3 { grid-column: span 3; }
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background-color: #1d4ed8;
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

.btn-accent:hover {
  background-color: #f59e0b;
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.header-top a {
  color: var(--accent-color);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.site-logo img {
  height: 50px;
  width: auto;
  margin-right: 0.5rem;
}

.site-nav {
  display: none;
  flex: 1;
  margin: 0 2rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.site-nav a:hover {
  color: var(--secondary-color);
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
}

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

.social-icons {
  display: flex;
  gap: 0.5rem;
}

.social-icons a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-light);
  color: var(--primary-color);
  font-size: 0.9rem;
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* ============================================
   ANNOUNCEMENT BANNER
   ============================================ */

.announcement-banner {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.announcement-banner a {
  color: var(--accent-color);
  font-weight: 600;
}

.close-announcement {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26, 46, 74, 0.85) 0%, rgba(26, 46, 74, 0.5) 60%, rgba(26, 46, 74, 0.2) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.hero .accent {
  color: var(--accent-color);
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

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

/* ============================================
   STATS BAR
   ============================================ */

.stats-bar {
  background-color: var(--bg-light);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e8f0fe;
  border-radius: var(--radius-lg);
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.stat-content h3 {
  font-size: 1.5rem;
  margin: 0;
}

.stat-content p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   CAROUSEL / SLIDER
   ============================================ */

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-item {
  display: none;
  width: 100%;
}

.carousel-item.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background-color: var(--white);
}

/* ============================================
   SECCIONES
   ============================================ */

.section {
  padding: 3rem 0;
}

.section-title {
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.section-light {
  background-color: var(--bg-light);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1rem;
}

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

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

.footer-section h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ============================================
   FIDELIZACIÓN CLUB
   ============================================ */

.fidelization-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.fidelization-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  z-index: 0;
}

.fidelization-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.fidelization-content h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.fidelization-content .club-name {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.fidelization-content p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.fidelization-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ============================================
   DIRECTORIO
   ============================================ */

.directory-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.directory-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.directory-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e8f0fe;
  border-radius: var(--radius-lg);
  color: var(--secondary-color);
  flex-shrink: 0;
}

.directory-info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.directory-category {
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.directory-address {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-center {
  text-align: center;
}

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

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
  display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .hero {
    min-height: 350px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }
}
