/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  GeneratePress Child Theme - jeremydegryse.com
 Author:       Jeremy Degryse
 Author URI:   https://jeremydegryse.com
 Template:     generatepress
 Version:      2.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --navy-mid: #334155;
    --indigo: #6366f1;
    --indigo-light: #818cf8;
    --indigo-dark: #4f46e5;
    --emerald: #10b981;
    --emerald-light: #34d399;
    --amber: #f59e0b;
    --pink: #ec4899;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-pill: 50px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --transition: all 0.3s ease;
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    background-color: var(--light-bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

a:hover {
    color: var(--indigo-light);
}

img {
    border-radius: var(--radius-sm);
}

/* ============================================
   HEADER & SITE BRANDING
   ============================================ */
.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo), var(--emerald), var(--indigo));
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
}

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

.site-branding {
    padding: 0;
}

.main-title a,
.site-title a,
p.site-title a {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--white) !important;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.main-title a:hover,
.site-title a:hover,
p.site-title a:hover {
    background: linear-gradient(135deg, var(--indigo-light), var(--emerald-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-description {
    color: var(--gray-400);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-navigation {
    background: var(--navy) !important;
}

.main-navigation,
.main-navigation .main-nav {
    background-color: var(--navy) !important;
}

.menu-toggle,
.main-navigation .menu-toggle {
    color: var(--white);
}

.main-navigation .main-nav ul li a,
.main-navigation .main-nav > ul > li > a,
.menu-item a {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-300) !important;
    padding: 12px 18px;
    transition: var(--transition);
    position: relative;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav > ul > li > a:hover {
    color: var(--white) !important;
    background: rgba(99, 102, 241, 0.1) !important;
}

.main-navigation .main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo), var(--emerald));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.main-navigation .main-nav ul li a:hover::after,
.main-navigation .main-nav ul li.current-menu-item a::after {
    width: 70%;
}

.main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--white) !important;
}

/* Sub-menu */
.main-navigation .main-nav ul ul {
    background: var(--navy-light);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.main-navigation .main-nav ul ul li a {
    text-transform: none;
    letter-spacing: 0.3px;
    font-size: 0.85rem;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.site-content {
    padding-top: 0;
}

.inside-article {
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ============================================
   H2 GRADIENT UNDERLINE
   ============================================ */
.entry-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 12px;
    position: relative;
    display: inline-block;
}

.entry-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--indigo), var(--emerald));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.entry-content h2:hover::after {
    width: 100%;
}

.entry-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    color: var(--navy-light);
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.wp-block-button__link,
button,
input[type="submit"],
.button,
a.button {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
    color: var(--white) !important;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    text-transform: none;
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover,
.button:hover,
a.button:hover {
    background: linear-gradient(135deg, var(--indigo-light), var(--indigo));
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    color: var(--white) !important;
}

/* ============================================
   CARDS (general)
   ============================================ */
.card,
.wp-block-column {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover,
.wp-block-column:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.2);
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

thead {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

thead th {
    color: var(--white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    text-align: left;
    border: none;
}

tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
    color: var(--gray-600);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   FAQ / DETAILS ACCORDION
   ============================================ */
details {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
}

details:hover {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

details[open] {
    border-color: var(--indigo);
}

details summary {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--navy);
    padding: 18px 24px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--indigo);
    transition: var(--transition);
}

details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

details summary:hover {
    background: rgba(99, 102, 241, 0.03);
}

details > div,
details > p {
    padding: 0 24px 18px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ============================================
   CODE BLOCKS
   ============================================ */
pre, code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

pre {
    background: var(--navy) !important;
    color: var(--emerald-light) !important;
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
    font-size: 0.9rem;
    line-height: 1.6;
}

code {
    background: rgba(99, 102, 241, 0.08);
    color: var(--indigo);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ============================================
   BLOCKQUOTES
   ============================================ */
blockquote {
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, var(--indigo), var(--emerald)) 1;
    background: rgba(99, 102, 241, 0.04);
    padding: 24px 30px;
    margin: 2rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--gray-600);
}

blockquote p {
    margin: 0;
}

/* ============================================
   LISTS
   ============================================ */
.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
}

.entry-content ul li,
.entry-content ol li {
    margin-bottom: 8px;
    padding-left: 8px;
}

.entry-content ul li::marker {
    color: var(--indigo);
}

.entry-content ol li::marker {
    color: var(--indigo);
    font-weight: 600;
}

/* ============================================
   IMAGES & MEDIA
   ============================================ */
.entry-content img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.entry-content img:hover {
    box-shadow: var(--shadow-lg);
}

figure {
    margin: 2rem 0;
}

figcaption {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
    margin-top: 8px;
    font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--gray-400);
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo), var(--emerald), var(--indigo));
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
}

.site-footer a {
    color: var(--gray-300);
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--indigo-light);
}

.site-info {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.site-info a[href*="generatepress"],
.site-info .flavor-flavor {
    display: none !important;
}

/* ============================================
   FOOTER WIDGETS
   ============================================ */
.footer-widgets {
    background: transparent;
    padding: 40px 0;
}

.footer-widgets .widget-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--white);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.footer-widgets a {
    color: var(--gray-400);
}

.footer-widgets a:hover {
    color: var(--indigo-light);
}

/* ============================================
   SIDEBAR
   ============================================ */
.widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo), var(--emerald));
}

/* ============================================
   HOMEPAGE SPECIFIC
   ============================================ */
.home .inside-article {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
}

.home .entry-header {
    display: none;
}

.home .site-content .content-area {
    width: 100%;
}

.home #right-sidebar,
.home .sidebar {
    display: none;
}

.home .site-content {
    padding-top: 0;
}

/* ============================================
   SCROLLBAR CUSTOM
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--indigo);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--navy);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .inside-article {
        padding: 20px;
    }

    .entry-content {
        font-size: 1rem;
    }

    .wp-block-button__link,
    button,
    .button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .main-navigation .main-nav ul li a {
        letter-spacing: 0.5px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }

    .inside-article {
        padding: 16px;
    }

    pre {
        padding: 16px;
        font-size: 0.8rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--indigo), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
