/*
Theme Name: Ediciones Cal y Arena
Theme URI: http://edicionescalyarena.com.mx/
Author: Rodrigo Torres
Author URI: http://edicionescalyarena.com.mx/
Description: Custom Block Theme (Full Site Editing) built for Ediciones Cal y Arena, retaining original aesthetics, custom post types (libro, videos, laotraaventura), taxonomies (libro-cat, autor), and metadata.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: edicionescalyarena
Tags: block-theme, full-site-editing, custom-colors, grid-layout

(C) 2026 Ediciones Cal y Arena
*/

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

body {
  font-family: 'Lato', sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

/* Color Variables */
:root {
  --wp--preset--color--primary: #d42029;
  --wp--preset--color--dark-red: #9c060e;
  --wp--preset--color--secondary: #f99b27;
  --wp--preset--color--secondary-hover: #f68a04;
  --wp--preset--color--blue-accent: #3a6daa;
  --wp--preset--color--light-bg: #f8f9fa;
  --wp--preset--color--dark-text: #333333;
  --wp--preset--color--warning: #ffc107;
  --wp--preset--color--dark-footer: #212529;
}

/* Base Links */
a {
  color: #d42029;
  text-decoration: none;
  transition: all 0.25s ease-in-out;
}

a:hover,
a:focus {
  color: #9c060e;
}

/* Header Styles */
.site-header {
  background-color: #ffffff;
}

.main-navigation-bar {
  background-color: #f99b27;
}

.main-navigation-bar a {
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  padding: 12px 18px;
  display: block;
}

.main-navigation-bar a:hover,
.main-navigation-bar .current-menu-item > a {
  background-color: #f68a04;
  color: #ffffff;
}

/* Book Cover Thumbnail Shadow & Hover */
.thumbnail_libro {
  border: 6px solid #e5e5e5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  background: #ffffff;
  overflow: hidden;
  border-radius: 4px;
}

.thumbnail_libro:hover {
  border-color: #d42029;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(212, 32, 41, 0.25);
}

.thumbnail_libro img {
  width: 100%;
  height: auto;
  display: block;
}

/* Book Titles */
.libro-titulo-single {
  color: #d42029;
  font-weight: 700;
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.libro-autor-single {
  font-size: 1.25rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.libro-autor-single a {
  color: #d42029;
}

.libro-autor-single a:hover {
  color: #ffffff;
  background-color: #d42029;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Book Meta Data List */
.libro-datos {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  background-color: #f8f9fa;
  border-left: 4px solid #d42029;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
}

.libro-datos li {
  margin-bottom: 0.5rem;
  color: #444;
}

.libro-datos li strong {
  color: #111;
  font-weight: 700;
}

.libro-datos a.btn-store {
  display: inline-block;
  padding: 4px 12px;
  background-color: #3a6daa;
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.libro-datos a.btn-store:hover {
  background-color: #d42029;
  color: #ffffff;
}

/* Section Headers */
.titulo-seccion {
  font-size: 2rem;
  font-weight: 300;
  color: #d42029;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.titulo-seccion span {
  border-bottom: 3px solid #d42029;
  padding-bottom: 0.5rem;
}

/* -------------------------------------------------------------
 * FOOTER STYLES (Matching Reference Cal y Arena: http://localhost:8484/)
 * ----------------------------------------------------------- */
.footer-section,
footer.wp-block-group.footer-section {
  background-color: #212529 !important;
  color: #f8f9fa !important;
  padding-top: 3.5rem !important;
  padding-bottom: 2rem !important;
  font-family: 'Lato', sans-serif;
  border-top: none;
}

.footer-section a {
  color: #f8f9fa;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: #ffc107 !important;
}

.footer-widget {
  margin-bottom: 1.5rem;
}

.footer-widget h4 {
  color: #ffffff !important;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 0;
  margin-bottom: 1.2rem;
  position: relative;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.footer-widget h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #ffc107;
  margin-top: 8px;
}

.footer-widget p {
  color: #e9ecef;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-header-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 1.2rem;
}

.icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background-color: #ffc107;
  color: #212529;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.icon-box i {
  color: #212529;
  font-size: 18px;
}

.footer-section address {
  font-style: normal;
  line-height: 1.6;
  color: #e9ecef;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #e9ecef;
  font-size: 0.95rem;
}

.footer-contact-list li {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact-list i.text-warning,
.text-warning {
  color: #ffc107 !important;
}

/* Store Logos / Badges */
.store-badges {
  margin-top: 0.8rem;
}

.store-logos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: all 0.3s ease;
  line-height: 0;
}

.store-logo-img {
  height: 24px;
  width: auto;
  max-width: 80px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.store-logo-link:hover {
  background: rgba(255, 193, 7, 0.15);
  transform: translateY(-2px);
}

.store-logo-link:hover .store-logo-img {
  opacity: 1;
  filter: brightness(0) invert(79%) sepia(61%) saturate(748%) hue-rotate(360deg) brightness(102%) contrast(106%);
}

/* Social Buttons */
.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.8rem;
}

.footer-social-links .social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 15px;
  text-decoration: none;
}

.footer-social-links .social-btn:hover {
  background: #ffc107;
  color: #212529 !important;
  border-color: #ffc107;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

/* Newsletter Form */
.newsletter-form .input-group {
  display: flex;
  width: 100%;
  margin-bottom: 0.8rem;
}

.newsletter-form .form-control {
  flex: 1;
  background-color: #2c2c2c;
  border: 1px solid #495057;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.newsletter-form .form-control:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
  background-color: #2c2c2c;
  color: #fff;
}

.newsletter-form .btn-newsletter {
  background-color: #ffc107;
  color: #212529;
  border: 1px solid #ffc107;
  border-radius: 0 4px 4px 0;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.newsletter-form .btn-newsletter:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

.newsletter-form .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #ced4da;
}

.newsletter-form .form-check input[type="checkbox"] {
  accent-color: #ffc107;
  cursor: pointer;
}

/* Footer Bottom Divider & Copyright */
.footer-divider {
  border: 0;
  border-top: 1px solid #495057;
  margin: 2.5rem 0 1.5rem 0;
}

.footer-copyright {
  text-align: center;
  color: #adb5bd;
  font-size: 0.9rem;
  margin: 0;
}

.footer-copyright strong {
  color: #ffc107;
}

/* Floating Social Icons (Left Side) */
.floating-icons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.floating-icons .icon {
  background-color: #333333;
  color: #ffffff;
  padding: 12px;
  border-radius: 50%;
  font-size: 20px;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.floating-icons .icon.facebook { background-color: #3b5998; }
.floating-icons .icon.twitter { background-color: #000000; }
.floating-icons .icon.instagram { background-color: #e4405f; }
.floating-icons .icon.email { background-color: #d42029; }
.floating-icons .icon.whatsapp { background-color: #25d366; }

.floating-icons .icon:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@media screen and (max-width: 768px) {
  .floating-icons {
    bottom: 10px;
    left: 10px;
    gap: 8px;
  }
  .floating-icons .icon {
    font-size: 18px;
    width: 38px;
    height: 38px;
  }
}

/* Scroll Top Button (Right Side) */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  background-color: #ffc107;
  color: #212529;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: all 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

.scroll-top:hover {
  background-color: #e0a800;
  color: #212529;
  transform: translateY(-3px);
}

/* Subscribe Button */
.btn-subscribe {
  background-color: #d42029;
  color: #ffffff !important;
  border-radius: 20px;
  padding: 8px 22px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-subscribe:hover {
  background-color: #9c060e;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(156, 6, 14, 0.4);
}