/**
 * Time2ChuckIt - Custom Styles
 * 
 * Additional customizations beyond the base style.css
 * Version: 1.2.4 (Footer text function fixed - echo to return)
 */

/* ===========================
   List Indentation Fix - Privacy Policy Style
   =========================== */

/* Base list styling - Natural alignment with text start */
ul, ol {
    margin-left: 20px;        /* Minimal spacing from left edge */
    padding-left: 15px;       /* Bullet marker close to text */
    margin-top: 0.7em;        /* Tight spacing above list */
    margin-bottom: 0.8em;     /* Slight space below */
}

/* Nested lists - Proper indentation under parent */
ul ul, ol ul {
    margin-left: 25px;       /* Indent nested items rightward */
    padding-left: 10px;       /* Less padding for sub-items */
    margin-top: 0.3em;        /* Tighter spacing between levels */
    margin-bottom: 0.5em;
}

ol ol, ol ul, ul ol, ul ul {
    margin-top: 0.2em;        /* Minimal gap between list levels */
}

/* List item styling */
li {
    line-height: 1.6;
    padding-left: 3px;        /* Minimal spacing inside items */
    margin-bottom: 0.4em;     /* Consistent vertical rhythm */
}

/* Nested list specific spacing */
ul ul li, ol ul li {
    margin-top: 0.2em;
    margin-bottom: 0.3em;
}

ol ul li {
    padding-left: 10px;       /* Compact indent for ordered+unordered mixes */
}

/* Nested list specific spacing */
ul ul li, ol ul li {
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

ol ul li {
    padding-left: 30px;
}

/* ===========================
   Joomla Migrated Hero Section
   =========================== */

.hero-joomla-migrated {
    background: linear-gradient(135deg, #1a252f 0%, #1e3c52 100%);
}

.hero-joomla-content h1 {
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.hero-joomla-content > span:first-of-type {
    color: #f5a623;
    display: block;
    font-size: clamp(1.2rem, 4vw, 1.75rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-joomla-content p {
    line-height: 1.6;
}

.hero-joomla-migrated .btn-hero-joomla {
    background-color: #f5a623;
    color: #1a1a2e;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-md);
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
    margin-bottom: var(--spacing-sm);
}

.hero-joomla-migrated .btn-hero-joomla:hover {
    background-color: #ffc400;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(245, 166, 35, 0.4);
}

.hero-joomla-content p:last-of-type {
    font-size: 0.9rem;
    opacity: 0.75;
    margin-bottom: 0;
}

/* Decorative background elements */
.hero-joomla-migrated::before,
.hero-joomla-migrated::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 1;
}

.hero-joomla-migrated::before {
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(231, 29, 54, 0.1) 0%, transparent 70%);
}

.hero-joomla-migrated::after {
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, transparent 70%);
}

/* ===========================
   Loading States
   =========================== */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-light);
    border-top-color: var(--color-primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .btn,
    .site-header,
    .site-footer,
    #comments {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* ===========================
   Accessibility Enhancements
   =========================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--color-primary-red);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

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

/* Focus States for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 2px;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================
   Print Friendly Links
   =========================== */

@media print {
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
    
    .more-link,
    .pagination {
        display: none;
    }
}

/* ===========================
   Hero Section Enhancements
   =========================== */

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(231, 29, 54, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===========================
   Responsive Typography Tweaks
   =========================== */

@media (max-width: 640px) {
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .pricing-price {
        font-size: 2.5rem;
    }
}

/* ===========================
   Widget Area Styling
   =========================== */

.widget-area {
    padding: var(--spacing-md);
    margin-left: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.sidebar-title {
    color: var(--color-primary-red);
    font-size: 1.25rem;
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-light);
    margin-bottom: var(--spacing-sm);
}

/* ===========================
   Comments Styling
   =========================== */

.comment-list ol {
    list-style-type: none !important;
    padding-left: 0 !important;
}

.comment-children {
    border-left: 3px solid var(--color-light);
    margin-left: 1.5rem;
    padding-left: 1rem;
}

/* ===========================
   Admin Bar Customization (Optional)
   =========================== */

@media screen and (max-width: 782px) {
    .wp-admin-bar {
        display: none !important;
    }
}

/* ===========================
   Utility Classes
   =========================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* ===========================
   Image Loading States
   =========================== */

img.loading {
    opacity: 0.5;
}

img.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===========================
   Table of Contents (if added in future)
   =========================== */

.toc {
    background-color: var(--color-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.toc ul {
    list-style-type: none;
    counter-reset: section-counter;
}

.toc li {
    counter-increment: section-counter;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-light);
}

.toc a:hover {
    color: var(--color-primary-red);
}

/* ===========================
   Print Styles for Tables
   =========================== */

@media print {
    table {
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tfoot {
        display: table-footer-group;
    }
}
/* ===========================
   Dropdown Navigation Menus
   =========================== */

/* Hide submenus by default */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    min-width: 200px;
    z-index: 1000;
}

/* Show submenu on parent hover */
.menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

/* Desktop menu dropdown behavior */
@media (min-width: 768px) {
    .main-navigation ul li:hover > .submenu {
        display: block;
        animation: fadeIn 0.2s ease-in-out;
    }
    
    /* Mobile menu - click to toggle */
    .main-navigation ul li.has-submenu > a::after {
        content: ' ▼';
    }
}

/* Mobile menu dropdown behavior */
@media (max-width: 767px) {
    .submenu {
        position: static;
        box-shadow: none;
        border-left: 1px solid var(--color-light);
        display: none !important;
    }
        /* Show submenu when parent has open-submenu class */
        li.open-submenu > .submenu,
        li.current-menu-ancestor > .submenu {
            display: block !important;
        }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Nested submenu positioning */
.submenu .submenu {
    top: 0;
    left: 100%;
}

/* Mobile nested submenus */
@media (max-width: 767px) {
    .submenu .submenu {
        position: static;
        border-left: none;
        padding-left: 20px;
    }
    
    /* Add indentation for nested items on mobile */
    .main-navigation ul li.has-submenu > a::before {
        content: '› ';
        color: var(--color-medium);
    }
}

/* Active submenu state */
.main-navigation ul li.current-menu-ancestor > .submenu,
.main-navigation ul li.menu-item-current + .submenu {
    display: block;
}
