/*
Theme Name: Glezper Media
Theme URI: https://glezper.com
Author: Christian González Pérez
Author URI: https://glezper.com
Description: Parent theme for Glezper Media publications — INK-inspired editorial design system with mobile-first responsive layout and customizable brand variables.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glezper-media
Tags: blog, news, magazine, editorial, responsive, mobile-first, custom-colors
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   Override these in child themes to customize
   ============================================ */

:root {
  /* Brand Colors - Override in child themes */
  --gm-primary: #333333;
  --gm-background: #ffffff;
  --gm-text: #333333;
  --gm-text-light: #666666;
  --gm-accent: #0066cc;
  --gm-heading: #1a1a1a;
  --gm-border: #e0e0e0;
  
  /* Typography */
  --gm-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --gm-font-heading: Georgia, 'Times New Roman', serif;
  
  /* Spacing (mobile-first) */
  --gm-spacing-xs: 0.5rem;
  --gm-spacing-sm: 1rem;
  --gm-spacing-md: 1.5rem;
  --gm-spacing-lg: 2rem;
  --gm-spacing-xl: 3rem;
  
  /* Container widths */
  --gm-container-sm: 640px;
  --gm-container-md: 768px;
  --gm-container-lg: 1024px;
  --gm-container-xl: 1280px;
  
  /* Grid gaps */
  --gm-gap: 1.5rem;
  
  /* Border radius */
  --gm-radius: 0.5rem;
  
  /* Transitions */
  --gm-transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--gm-font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gm-text);
  background-color: var(--gm-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gm-font-heading);
  color: var(--gm-heading);
  line-height: 1.2;
  margin-bottom: var(--gm-spacing-sm);
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Responsive typography */
@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
}

p {
  margin-bottom: var(--gm-spacing-md);
}

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

a:hover {
  opacity: 0.8;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.gm-container {
  width: 100%;
  max-width: var(--gm-container-xl);
  margin: 0 auto;
  padding: 0 var(--gm-spacing-md);
}

@media (min-width: 768px) {
  .gm-container {
    padding: 0 var(--gm-spacing-lg);
  }
}

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

.site-header {
  background-color: var(--gm-background);
  border-bottom: 1px solid var(--gm-border);
  padding: var(--gm-spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--gm-spacing-sm);
}

.site-title {
  font-size: 1.5rem;
  margin: 0;
}

.site-title a {
  color: var(--gm-heading);
  text-decoration: none;
}

.site-description {
  font-size: 0.875rem;
  color: var(--gm-text-light);
  margin: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-navigation {
  margin-top: var(--gm-spacing-sm);
}

.main-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gm-spacing-sm);
}

.main-navigation a {
  color: var(--gm-text);
  padding: var(--gm-spacing-xs) var(--gm-spacing-sm);
  display: block;
  border-radius: var(--gm-radius);
  transition: var(--gm-transition);
  min-height: 44px; /* Touch-friendly */
  display: flex;
  align-items: center;
}

.main-navigation a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .main-navigation {
    margin-top: 0;
  }
}

/* ============================================
   CARD GRID (INK-inspired)
   ============================================ */

.gm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gm-gap);
  margin-bottom: var(--gm-spacing-xl);
}

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

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

/* ============================================
   ARTICLE CARD
   ============================================ */

.gm-card {
  background: var(--gm-background);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  overflow: hidden;
  transition: var(--gm-transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gm-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.gm-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.gm-card-content {
  padding: var(--gm-spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gm-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gm-accent);
  font-weight: 600;
  margin-bottom: var(--gm-spacing-xs);
}

.gm-card-title {
  font-size: 1.25rem;
  margin-bottom: var(--gm-spacing-sm);
  line-height: 1.3;
}

.gm-card-title a {
  color: var(--gm-heading);
}

.gm-card-excerpt {
  font-size: 0.9375rem;
  color: var(--gm-text-light);
  margin-bottom: var(--gm-spacing-sm);
  flex-grow: 1;
}

.gm-card-meta {
  font-size: 0.875rem;
  color: var(--gm-text-light);
  display: flex;
  gap: var(--gm-spacing-sm);
  flex-wrap: wrap;
}

/* ============================================
   SINGLE POST
   ============================================ */

.single-post-header {
  margin-bottom: var(--gm-spacing-lg);
}

.entry-title {
  font-size: 2rem;
  margin-bottom: var(--gm-spacing-sm);
}

@media (min-width: 768px) {
  .entry-title {
    font-size: 2.5rem;
  }
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--gm-text-light);
  margin-bottom: var(--gm-spacing-md);
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 720px;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--gm-radius);
  margin: var(--gm-spacing-lg) 0;
}

.entry-content p {
  margin-bottom: var(--gm-spacing-md);
}

.entry-content h2,
.entry-content h3 {
  margin-top: var(--gm-spacing-xl);
  margin-bottom: var(--gm-spacing-md);
}

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

.site-footer {
  background-color: var(--gm-heading);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--gm-spacing-xl) 0 var(--gm-spacing-lg);
  margin-top: var(--gm-spacing-xl);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-content {
  text-align: center;
  font-size: 0.875rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.alignwide {
  max-width: 1280px;
}

.alignfull {
  max-width: 100vw;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--gm-accent);
  color: white;
  padding: var(--gm-spacing-sm) var(--gm-spacing-md);
  text-decoration: none;
  z-index: 10000;
}

.skip-link:focus {
  top: 0;
}

/* Ensure minimum touch target sizes */
button,
input[type="submit"],
input[type="button"],
.button,
.btn {
  min-height: 44px;
  min-width: 44px;
}
