/**
 * Theme Name: DCRTL Custom Theme
 * Description: Additional CSS beyond TailwindCSS utilities
 * Requires at least: WordPress 6.9.0
 * Version: 1.0.0
 * Author: TSC
 * Author URI: https://www.thestevenscompany.com
 * License: Proprietary
 * Text Domain: dcrtl
 */

/* ============================================ 
   CSS Custom Properties (Variables)
   ============================================ */
:root {
    --logo-red: #ec1c24;
    --logo-green: #00a551;
    --dark-green: #344b52;
    --cta: #ffa630;
    --white: #FFFFFF;
    --black: #000000;
    --gray: #cacac6;
    --dark-gray: #111111;
    --mint-green: #b8c2aa;
    --light-mint-green: #e6eae1;
    --beige: #e6eae1;
    --brownish-red: #574a4a;
    --red-wine: #281c1c;
    --light-brown: #6e6560;
    --translucent-light: rgba(255, 255, 255, 0.7);
    --translucent-dark: rgba(0, 0, 0, 0.7);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ============================================
   Header Styles
   ============================================ */
.site-header {
    position: relative;
    z-index: 100;
}

/* Logo positioning to straddle both rows */
.logo-container {
    background: transparent;
}

@media (min-width: 1024px) {
    .logo-container {
        position: relative;
        margin-top: -3.5rem; /* Pull logo up to straddle both rows */
        z-index: 25;
    }
    
    .logo-img {
        max-height: 7rem;
    }
}

/* ============================================
   Navigation Styles
   ============================================ */

/* Desktop Menu Hover Effects */
.menu-item:hover > .submenu {
    display: block;
}

.submenu-item.has-submenu:hover > .submenu {
    display: block;
}

/* Submenu positioning adjustments */
.submenu {
    margin-top: 0;
}

/* Ensure submenus stay visible when hovering */
.submenu-item {
    position: relative;
}

/* Dropdown arrow indicators */
.menu-item > a .fa-caret-down,
.submenu-item > a .fa-caret-right {
    transition: transform 0.2s ease;
}

.menu-item:hover > a .fa-caret-down {
    transform: rotate(180deg);
}

/* ============================================
   Mobile Menu Styles
   ============================================ */
.mobile-menu-drawer.active {
    display: block;
}

.mobile-menu-list li {
    border-bottom: 1px solid var(--gray);
}

.mobile-menu-list li a {
    display: block;
    padding: 1rem;
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
}

.mobile-menu-list li a:hover {
    background-color: var(--light-mint-green);
}

/* Mobile submenu styles */
.mobile-submenu {
    display: none;
    padding-left: 1rem;
    background-color: var(--beige);
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu li a {
    font-size: 0.875rem;
    font-weight: normal;
    text-transform: none;
}

.mobile-menu-toggle-submenu {
    cursor: pointer;
    padding: 0.5rem;
}

/* ============================================
   Hero Section Styles
   ============================================ */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-video-container video {
    display: block;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.play-button {
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

.play-button:focus {
    outline: 3px solid var(--white);
    outline-offset: 3px;
}

/* ============================================
   Resource Section Styles
   ============================================ */
.link-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.link-card:hover {
    box-shadow: 0 4px 12px var(--translucent-dark);
}

.link-card img {
    transform: scale(1.05);
}

.link-card:hover img {
    transform: scale(1.05);
}

.link-card-overlay {
    transition: background-color 0.3s ease;
}

.link-card-overlay span {
    text-shadow: #000000 0 0 1rem;
}

.link-card:hover .link-card-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Equal height for links panel cards on larger screens */
@media (min-width: 1024px) {
    .links-panel .grid {
        height: 100%;
    }
    
    .link-card {
        aspect-ratio: auto;
        height: 100%;
        min-height: 200px;
    }
    
    .info-box {
        min-height: 200px;
    }
}

/* ============================================
   Footer Styles
   ============================================ */
.footer-menu ul {
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

/* Footer resources panel equal spacing */
.footer-resources .facebook-panel,
.footer-resources .newsletter-panel,
.footer-resources .address-panel {
    flex: 1;
    min-width: 300px;
}

/* Social icon hover effects */
.social-icons a {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons a:hover {
    transform: scale(1.1);
}

/* Donate button hover */
.donate-btn {
    transition: all 0.2s ease;
}

.donate-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px var(--translucent-dark);
}

/* ============================================
   Inside Page Content Styles
   ============================================ */
.inside-content {
    background-color: var(--white);
}

/* Typography for page content */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    font-family: 'Lora', serif;
    color: var(--dark-green);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.page-content h1 {
    font-size: 2.5rem;
}

.page-content h2 {
    font-size: 2rem;
}

.page-content h3 {
    font-size: 1.5rem;
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--black);
}

.page-content ul,
.page-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content a {
    color: var(--dark-green);
    text-decoration: underline;
}

.page-content a:hover {
    color: var(--logo-green);
}

.page-content blockquote {
    border-left: 4px solid var(--mint-green);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--light-brown);
}

.page-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

/* ============================================
   Accessibility & Focus States
   ============================================ */
a:focus,
button:focus {
    outline: 2px solid var(--dark-green);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dark-green);
    color: var(--white);
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-balance {
    text-wrap: balance;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .hero-section {
        display: none;
    }
    
    .inside-content {
        padding: 0;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1023px) {
    /* Stack header elements on mobile */
    .top-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .top-nav a {
        font-size: 1rem;
    }
    
    /* Adjust logo size on mobile */
    .logo-img {
        max-height: 4rem;
    }
    
    /* Hero text adjustments */
    .hero-text {
        font-size: 1.5rem;
    }
    
    .play-button {
        width: 4rem;
        height: 4rem;
    }
    
    .play-button i {
        font-size: 1.5rem;
    }
    
    /* Footer adjustments */
    .footer-resources {
        text-align: center;
    }
    
    .address-panel p {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    /* Further mobile adjustments */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text br {
        display: none;
    }
}
