/*
Theme Name: CouponHub
Description: Professional coupon website theme for CouponHubUSA
Version: 1.0
Author: CouponHub
*/

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

:root {
  --orange: #FF6600;
  --orange-dark: #E55A00;
  --orange-light: #FF8C33;
  --orange-pale: #FFF4EE;
  --white: #FFFFFF;
  --gray-light: #F8F9FA;
  --gray: #6C757D;
  --gray-dark: #343A40;
  --text: #1A1A1A;
  --border: #E8E8E8;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(255,102,0,0.2);
  --radius: 12px;
  --font: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--orange); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--orange-dark); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.logo-text span { color: var(--orange); }

.site-nav { display: flex; align-items: center; gap: 5px; }

.site-nav a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--orange-pale);
  color: var(--orange);
}

.nav-cta {
  background: var(--orange) !important;
  color: var(--white) !important;
  border-radius: 8px !important;
  padding: 9px 18px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--orange-dark) !important;
  color: var(--white) !important;
}

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

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, #FF6600 0%, #FF4500 50%, #E03A00 100%);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: white;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 35px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FEATURED COUPON BOX ===== */
.featured-coupon-wrap {
  max-width: 580px;
  margin: 0 auto 30px;
}

.featured-coupon {
  background: white;
  border-radius: 20px;
  padding: 30px 35px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.coupon-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.coupon-discount {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 4px;
}

.coupon-desc {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 20px;
}

.coupon-code-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--orange-pale);
  border: 2px dashed var(--orange);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 15px;
}

.coupon-code-text {
  font-size: 26px;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: 4px;
  flex: 1;
  text-align: center;
  font-family: 'Courier New', monospace;
}

.copy-btn {
  background: var(--orange);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.copy-btn.copied {
  background: #28a745;
}

.coupon-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: var(--gray);
}

.coupon-meta span { display: flex; align-items: center; gap: 5px; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-stat {
  color: white;
  text-align: center;
}

.hero-stat-number {
  font-size: 28px;
  font-weight: 900;
  display: block;
}

.hero-stat-label {
  font-size: 13px;
  opacity: 0.85;
}

/* ===== SECTION STYLES ===== */
section { padding: 60px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 35px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--text);
  position: relative;
  padding-left: 18px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background: var(--orange);
  border-radius: 3px;
}

.view-all {
  color: var(--orange);
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--orange);
  padding: 7px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.view-all:hover {
  background: var(--orange);
  color: white;
}

/* ===== COUPON CODES SECTION ===== */
.codes-section {
  background: var(--orange-pale);
  padding: 50px 0;
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.code-card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.code-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--orange);
}

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

.card-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 8px;
}

.card-discount {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 18px;
}

.card-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-code {
  flex: 1;
  background: var(--orange-pale);
  border: 1.5px dashed var(--orange);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 2px;
  text-align: center;
}

.card-copy {
  background: var(--orange);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.card-copy:hover { background: var(--orange-dark); }
.card-copy.copied { background: #28a745; }

/* ===== POST GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.post-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

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

.post-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

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

.post-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-tag {
  display: inline-block;
  background: var(--orange-pale);
  color: var(--orange);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.post-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.post-card-title a {
  color: var(--text);
}

.post-card-title a:hover { color: var(--orange); }

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray);
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.read-more {
  color: var(--orange);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more:hover { gap: 8px; }

/* ===== SINGLE POST ===== */
.page-hero {
  background: linear-gradient(135deg, #FF6600, #E03A00);
  padding: 50px 20px 60px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 900;
  color: white;
  max-width: 850px;
  margin: 0 auto 15px;
  line-height: 1.3;
}

.page-hero .meta {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  padding: 50px 0;
  align-items: start;
}

.post-content {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.post-content h2, .post-content h3, .post-content h4 {
  font-weight: 800;
  margin: 25px 0 12px;
  color: var(--text);
}

.post-content h2 { font-size: 24px; color: var(--orange-dark); }
.post-content h3 { font-size: 20px; }

.post-content p { margin-bottom: 18px; line-height: 1.8; }

.post-content ul, .post-content ol {
  padding-left: 25px;
  margin-bottom: 18px;
}

.post-content li { margin-bottom: 8px; line-height: 1.7; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.post-content table th {
  background: var(--orange);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.post-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.post-content table tr:hover td { background: var(--orange-pale); }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 25px; }

.widget {
  background: white;
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--orange-pale);
}

.widget-coupon {
  border: 2px solid var(--orange);
  border-radius: var(--radius);
}

.widget-coupon .widget-code {
  background: var(--orange-pale);
  border: 2px dashed var(--orange);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  margin: 15px 0;
}

.widget-coupon .code-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--orange);
  font-family: monospace;
  letter-spacing: 3px;
  display: block;
}

/* ===== BANNER ===== */
.promo-banner {
  background: linear-gradient(135deg, var(--orange) 0%, #FF4500 100%);
  padding: 40px 20px;
  text-align: center;
  color: white;
}

.promo-banner h2 {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
  margin-bottom: 10px;
}

.promo-banner p { margin-bottom: 20px; opacity: 0.9; font-size: 16px; }

.promo-code-display {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: white;
  border-radius: 12px;
  padding: 15px 25px;
  margin-bottom: 20px;
}

.promo-code-display .code {
  font-size: 28px;
  font-weight: 900;
  color: var(--orange);
  font-family: monospace;
  letter-spacing: 4px;
}

.promo-copy-btn {
  background: var(--orange);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.promo-copy-btn:hover { background: var(--orange-dark); }
.promo-copy-btn.copied { background: #28a745; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--gray-dark);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .logo-text { color: white; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.6); }

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== TOAST NOTIFICATION ===== */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  z-index: 9999;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
}

.copy-toast.success { background: #28a745; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.pagination a:hover { border-color: var(--orange); color: var(--orange); }
.pagination .current { background: var(--orange); color: white; border-color: var(--orange); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--gray-light);
  padding: 12px 0;
  font-size: 13px;
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--gray);
}

.breadcrumb-inner a { color: var(--orange); }
.breadcrumb-inner a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .single-post-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-stats { gap: 25px; }
  .menu-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 15px;
    border-top: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  .site-nav.open { display: flex; }
  .site-header { position: relative; }
  .header-inner { position: relative; }
  .codes-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .codes-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .featured-coupon { padding: 22px 20px; }
  .coupon-code-text { font-size: 20px; letter-spacing: 2px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
