/* ═══════════════════════════════════════════════════════════
   Global Page Styles — Premium Enhancements for All Tool Pages
   Applied via functions.php to every page in the theme.
   Targets shared CSS classes used across all tool page templates.
   ═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────
   Hero Section — Gradient Text
   ─────────────────────────────────── */
.hero h1 {
    background: linear-gradient(135deg, #1f2937 0%, #e07a5f 50%, #f4a261 100%) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: heroGradientShift 4s ease infinite;
}

@keyframes heroGradientShift {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}

.hero p {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero {
    animation: fadeInUp 0.7s ease-out;
}

/* ───────────────────────────────────
   Tool Cards — Glassmorphism & Glow
   ─────────────────────────────────── */
.tool-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.tool-card:hover {
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.12);
}

/* ───────────────────────────────────
   Section Titles — Decorative Underline
   ─────────────────────────────────── */
.section-title {
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #e07a5f, #f4a261);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 80px;
}

/* Palette titles get the same treatment */
.palette-title {
    position: relative;
    padding-bottom: 10px;
}

.palette-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, #e07a5f, #f4a261);
    border-radius: 2px;
}

/* ───────────────────────────────────
   Color Search — Enhanced Input
   ─────────────────────────────────── */
.color-search-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.color-search-input:focus {
    box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.1);
}

.color-search-btn {
    position: relative;
    overflow: hidden;
}

.color-search-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.color-search-btn:hover::after {
    left: 100%;
}

/* ───────────────────────────────────
   Copy Buttons — Premium Feel
   ─────────────────────────────────── */
.copy-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* ───────────────────────────────────
   Format Items — Hover Enhancement
   ─────────────────────────────────── */
.format-item {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.format-item:hover {
    background: #fff5f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(224, 122, 95, 0.15);
}

/* ───────────────────────────────────
   Harmony Cards — Lift + Border
   ─────────────────────────────────── */
.harmony-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid transparent;
}

.harmony-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    border-color: rgba(224, 122, 95, 0.1);
}

.harmony-title {
    position: relative;
    padding-bottom: 8px;
}

.harmony-title::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #e07a5f, #f4a261);
    border-radius: 1px;
    margin-top: 6px;
}

/* ───────────────────────────────────
   Color Swatches — Enhanced Interaction
   ─────────────────────────────────── */
.variation-swatch {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.variation-swatch:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.harmony-swatch {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.harmony-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* ───────────────────────────────────
   WCAG Result Items — Badge Style
   ─────────────────────────────────── */
.wcag-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.wcag-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(224, 122, 95, 0.1);
}

/* ───────────────────────────────────
   Action Buttons (Export, Random, Swap)
   ─────────────────────────────────── */
.action-btn,
.generate-btn,
.swap-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(224, 122, 95, 0.35);
}

.swap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    background: #e5e7eb;
}

/* ───────────────────────────────────
   Color Preview — Breathing Glow
   ─────────────────────────────────── */
.color-preview {
    transition: box-shadow 0.3s ease;
}

.color-preview:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ───────────────────────────────────
   Palette Strip — Premium Shadow
   ─────────────────────────────────── */
.palette-strip {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.palette-strip:hover {
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.palette-color {
    transition: flex 0.3s ease, filter 0.2s ease;
}

.palette-color:hover {
    filter: brightness(1.05);
}

/* ───────────────────────────────────
   Export Modal — Smooth Entrance
   ─────────────────────────────────── */
.export-modal.active {
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.export-content {
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ───────────────────────────────────
   Preview Box (Contrast Checker)
   ─────────────────────────────────── */
.preview-box {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ───────────────────────────────────
   Color Swatch Input
   ─────────────────────────────────── */
.color-swatch {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* ───────────────────────────────────
   Hex Input Fields — Glow on Focus
   ─────────────────────────────────── */
.hex-input:focus,
.base-hex-input:focus {
    box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.1);
}

/* ───────────────────────────────────
   Ratio Display (Contrast Checker)
   ─────────────────────────────────── */
.ratio-value {
    background: linear-gradient(135deg, #1f2937, #e07a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ───────────────────────────────────
   Nav Arrows — Premium
   ─────────────────────────────────── */
.nav-arrow {
    transition: all 0.25s ease;
}

.nav-arrow:hover {
    background: #fff5f0;
    color: #e07a5f;
    border-color: rgba(224, 122, 95, 0.3);
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.15);
}

/* ───────────────────────────────────
   Blog / Archive Enhancements
   ─────────────────────────────────── */
.archive .page-title,
.blog .page-title,
.search .page-title {
    position: relative;
    padding-bottom: 14px;
}

.archive .page-title::after,
.blog .page-title::after,
.search .page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #e07a5f, #f4a261);
    border-radius: 2px;
    margin-top: 12px;
}

/* ───────────────────────────────────
   Single Post Enhancements
   ─────────────────────────────────── */
.single .entry-title {
    background: linear-gradient(135deg, #1f2937, #e07a5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single .entry-content a {
    color: #e07a5f;
    text-decoration: underline;
    text-decoration-color: rgba(224, 122, 95, 0.3);
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.single .entry-content a:hover {
    color: #c65b3f;
    text-decoration-color: #c65b3f;
}

/* ───────────────────────────────────
   Staggered FadeInUp for Repeated Items
   ─────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
