/*
Theme Name: Image Resizer
Theme URI: https://example.com/imageresizer-pro
Author: ImageResizer Team
Author URI: https://example.com
Description: A clean, fast, fully responsive, AdSense-friendly WordPress theme designed for online image tools. White background, modern blue accents, optimized for Google AdSense approval. Works perfectly with the Bulk Image Tools plugin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imageresizer-pro
Tags: custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, theme-options, translation-ready, blog, one-column, two-columns, right-sidebar, left-sidebar, responsive-layout, accessibility-ready
*/

/* =====================================================
   CSS Variables - AdSense optimized color palette
   ===================================================== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-soft: #f1f5f9;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* =====================================================
   Layout
   ===================================================== */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo img {
  max-height: 36px;
  width: auto;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-title span {
  color: var(--primary);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-navigation a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

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

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

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

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.menu-toggle:hover {
  background: var(--bg-soft);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* =====================================================
   Ad Slots (AdSense ready)
   ===================================================== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 90px;
  margin: 16px 0;
  color: var(--text-light);
  font-size: 0.8rem;
  text-align: center;
}

.ad-slot.ad-header {
  min-height: 90px;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot.ad-sidebar {
  min-height: 250px;
  width: 100%;
}

.ad-slot.ad-incontent {
  min-height: 90px;
  margin: 24px 0;
}

.ad-slot.ad-footer {
  min-height: 90px;
  max-width: 728px;
  margin: 20px auto;
}

/* =====================================================
   Main Content Area
   ===================================================== */
.page-header {
  padding: 40px 0 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.content-with-sidebars {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 24px;
  padding: 20px 0 40px;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.sidebar .ad-slot {
  margin-top: 0;
}

/* Single column fallback */
.content-full {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0 40px;
}

/* =====================================================
   Tool Card / Drop Zone styles (used by plugin)
   ===================================================== */
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-dropzone {
  border: 3px dashed var(--primary);
  border-radius: var(--radius);
  background: var(--primary-light);
  padding: 48px 24px;
  text-align: center;
  transition: background 0.25s, border-color 0.25s;
  cursor: pointer;
}

.tool-dropzone.dragover {
  background: #dbeafe;
  border-color: var(--primary-dark);
}

.tool-dropzone .icon {
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}

.tool-dropzone .btn {
  margin: 8px 0;
}

.tool-dropzone p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 6px 0;
}

.tool-dropzone .hint {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-widget h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-widget ul li {
  margin-bottom: 8px;
}

.footer-widget a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* =====================================================
   Blog / Content styles
   ===================================================== */
.entry-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.entry-content {
  line-height: 1.75;
}

.entry-content h2,
.entry-content h3 {
  margin: 1.6em 0 0.6em;
  font-weight: 600;
}

.entry-content p {
  margin-bottom: 1.1em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.1em 1.4em;
  list-style: disc;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =====================================================
   Responsive - Tablet
   ===================================================== */
@media (max-width: 1024px) {
  .content-with-sidebars {
    grid-template-columns: 1fr 180px;
  }
  .sidebar-left {
    display: none;
  }
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================================================
   Responsive - Mobile
   ===================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    flex-direction: column;
  }

  .main-navigation.is-open {
    display: flex;
  }

  .main-navigation ul {
    flex-direction: column;
    width: 100%;
  }

  .main-navigation a {
    padding: 12px 16px;
    width: 100%;
  }

  .header-actions .btn-outline {
    display: none;
  }

  .content-with-sidebars {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .sidebar .ad-slot {
    min-height: 100px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .page-header {
    padding: 28px 0 16px;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .tool-dropzone {
    padding: 36px 16px;
  }
}

@media (max-width: 480px) {
  .container,
  .container-wide {
    padding: 0 14px;
  }

  .site-title {
    font-size: 1.15rem;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .sidebar {
    display: none !important;
  }
}
