/*
Theme Name: ImSand Theme
Theme URI: https://imsand.es
Author: ImSand
Author URI: https://imsand.es
Description: Tema personalizado para imsand.es - Interactive Sandbox
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: imsand-theme
*/

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

:root {
  --color-primary: #2d6a4f;
  --color-primary-light: #52b788;
  --color-primary-dark: #1b4332;
  --color-accent: #f4a261;
  --color-accent-dark: #e76f51;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-sand: #fdf6ec;
  --color-border: #dee2e6;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }

p { margin-bottom: 1.25rem; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-light); }

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

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ===== HEADER & NAVIGATION ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.site-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.site-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.site-logo .logo-text span { color: var(--color-accent-dark); }

nav#main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

nav#main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

nav#main-nav a:hover,
nav#main-nav .current-menu-item > a {
  background: var(--color-bg-light);
  color: var(--color-primary);
}

.header-cta {
  background: var(--color-primary) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 0.5rem 1.25rem !important;
}

.header-cta:hover {
  background: var(--color-primary-dark) !important;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.lang-switcher a {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.lang-switcher a.active,
.lang-switcher a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #40916c 100%);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

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

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-section p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #c85a2e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231,111,81,0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: white;
}

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

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

/* ===== FEATURES / CARDS ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

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

.feature-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--color-bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
  font-size: 1.5rem;
}

.feature-card h3 { margin-bottom: 0.75rem; }
.feature-card p { color: var(--color-text-muted); margin-bottom: 0; }

/* ===== WHY SAND SECTION ===== */
.why-sand-section {
  background: var(--color-bg-sand);
}

.why-sand-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.why-sand-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.why-sand-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.why-sand-text .section-label {
  display: inline-block;
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.why-sand-text h2 { margin-bottom: 1.5rem; }

.benefits-list {
  list-style: none;
  margin-top: 1.5rem;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.benefits-list li:last-child { border-bottom: none; }

.benefits-list li::before {
  content: "✓";
  background: var(--color-primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

/* ===== TEACHERS SECTION ===== */
.teachers-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
}

.teachers-section h2 { color: white; }
.teachers-section p { color: rgba(255,255,255,0.85); }

.teachers-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.teachers-text h2 { margin-bottom: 1.25rem; }

.teachers-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.teachers-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.download-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.download-box h4 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.download-box p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ===== WOOCOMMERCE PRODUCTS ===== */
.products-section { background: var(--color-bg-light); }

.products-section h2 { text-align: center; margin-bottom: 0.5rem; }
.products-section .section-intro { text-align: center; color: var(--color-text-muted); margin-bottom: 3rem; }

ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 2rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.products li.product {
  background: white !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--color-border) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow) !important;
  transition: all var(--transition) !important;
}

ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-lg) !important;
}

ul.products li.product img {
  width: 100% !important;
  height: 240px !important;
  object-fit: cover !important;
}

ul.products li.product .product-info {
  padding: 1.25rem !important;
}

ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-heading) !important;
  font-size: 1.1rem !important;
  color: var(--color-primary-dark) !important;
  margin-bottom: 0.5rem !important;
}

ul.products li.product .price {
  font-weight: 700 !important;
  color: var(--color-primary) !important;
  font-size: 1.2rem !important;
  margin-bottom: 1rem !important;
}

ul.products li.product .button {
  background: var(--color-primary) !important;
  color: white !important;
  border: none !important;
  padding: 0.65rem 1.5rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background var(--transition) !important;
  display: inline-block !important;
}

ul.products li.product .button:hover {
  background: var(--color-primary-dark) !important;
}

/* ===== CONTACT SECTION ===== */
.contact-section { background: var(--color-bg-sand); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1.5rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-text h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.contact-item-text p {
  margin: 0;
  color: var(--color-text);
  font-weight: 500;
}

.contact-form-wrapper {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-form-wrapper h3 { margin-bottom: 1.5rem; }

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  color: var(--color-text);
  background: white;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}

.form-field textarea { min-height: 120px; resize: vertical; }

/* ===== FOOTER ===== */
#site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

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

.footer-brand .logo-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p { font-size: 0.9rem; line-height: 1.7; }

.footer-col h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ===== SECTION LABELS ===== */
.section-label-center {
  text-align: center;
  display: block;
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading-center { text-align: center; margin-bottom: 1rem; }
.section-intro-center { text-align: center; color: var(--color-text-muted); max-width: 600px; margin: 0 auto 3rem; }

/* ===== DIVIDERS ===== */
hr.sand-divider {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
  margin: 3rem auto;
  max-width: 200px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  nav#main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  nav#main-nav.is-open { display: block; }
  nav#main-nav ul { flex-direction: column; gap: 0.25rem; }
  .header-inner { position: relative; }

  .why-sand-inner,
  .teachers-inner,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

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

  .hero-section { min-height: 70vh; }
  .section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; }
  .btn { justify-content: center; }
}
