/**
 * DesignMI - Fun Games & Learning Activities
 * Developed by AppWT LLC
 * CSS Prefix: developed-by-appwt-llc-
 */

/* ============================================
   CSS Variables - AppWT LLC Brand Colors
   ============================================ */
:root {
    --color-forest: #1B4332;
    --color-gold: #F4A261;
    --color-platinum: #F8F9FA;
    --color-obsidian: #0D2818;
    --color-secondary: #2D6A4F;
    --color-success: #52B788;
    --color-white: #FFFFFF;
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-border: #DDDDDD;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background: var(--color-platinum);
}

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

/* ============================================
   Header Styles
   ============================================ */
.site-header {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header a[href*="linkedin"]:hover {
    color: #0A66C2 !important;
    text-decoration: underline;
}

.site-header a[href*="appwt"]:hover {
    color: var(--color-secondary) !important;
    text-decoration: underline;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-forest);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.75rem;
}

.phone-link {
    color: var(--color-forest);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    white-space: nowrap;
}

.phone-link:hover {
    color: var(--color-gold);
}

/* ============================================
   Navigation - Desktop
   ============================================ */
.main-nav {
    border-top: 1px solid var(--color-border);
}

.hamburger-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.hamburger-line {
    width: 26px;
    height: 3px;
    background: var(--color-forest);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--color-gold);
}

/* Dropdown Toggle */
.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 2px;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Dropdown Menu - Desktop */
.dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    min-width: 200px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
    padding: 0.5rem 0;
    border-top: 3px solid var(--color-gold);
}

.nav-dropdown:hover > .dropdown-menu,
.nav-dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover > a .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    background: var(--color-platinum);
    color: var(--color-gold);
}

/* Donate Button in Nav */
.donate-nav-link {
    color: var(--color-white) !important;
    background: var(--color-success);
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    font-weight: 700;
}

.donate-nav-link:hover {
    background: #3d9168;
    color: var(--color-white) !important;
    transform: translateY(-2px);
}

/* Powered By Link */
.powered-by-link {
    color: var(--color-forest) !important;
    background: var(--color-platinum);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.powered-by-link:hover {
    background: var(--color-gold);
    color: var(--color-white) !important;
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    background: var(--color-platinum);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--color-forest);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

.breadcrumbs strong {
    color: var(--color-text-dark);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    min-height: calc(100vh - 400px);
}

.hero {
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--color-white);
}

/* ============================================
   Activity Grid
   ============================================ */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.activity-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--color-text-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.activity-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
}

.activity-card h3 {
    color: var(--color-forest);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.activity-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    flex-grow: 1;
}

.coming-soon {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* ============================================
   Community Grid
   ============================================ */
.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.community-card {
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.community-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.community-card h3 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.community-card p {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.activity-count {
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: auto;
    align-self: flex-start;
}

.coming-soon-card {
    opacity: 0.7;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-gold);
    color: var(--color-white);
}

.btn-primary:hover {
    background: #e08f4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-forest);
    color: var(--color-forest);
}

.btn-outline:hover {
    background: var(--color-forest);
    color: var(--color-white);
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
    background: var(--color-forest);
    color: var(--color-white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--color-gold);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom a {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--color-gold);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Share Buttons
   ============================================ */
.share-section {
    text-align: center;
    padding: 2rem;
    background: var(--color-platinum);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.share-section h3 {
    color: var(--color-forest);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-white);
    font-weight: 600;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn-facebook {
    background: #1877F2;
}

.share-btn-twitter {
    background: #1DA1F2;
}

.share-btn-pinterest {
    background: #E60023;
}

.share-btn-linkedin {
    background: #0A66C2;
}

.share-btn-email {
    background: var(--color-forest);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   Responsive Design - Tablet (1023px)
   ============================================ */
@media (max-width: 1023px) {
    /* Show hamburger */
    .hamburger-toggle {
        display: flex;
    }

    /* Hide desktop nav, show as mobile drawer */
    .main-nav {
        border-top: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        height: 100dvh;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 70px 0 2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu > li > a {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .nav-menu > li > a:hover,
    .nav-menu > li > a.active {
        background: var(--color-platinum);
        color: var(--color-gold);
    }

    /* Mobile dropdown - accordion style */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        background: var(--color-platinum);
    }

    .nav-dropdown.open > .dropdown-menu {
        max-height: 500px;
        padding: 0.25rem 0;
    }

    /* Override hover for mobile - use click/tap only */
    .nav-dropdown:hover > .dropdown-menu {
        max-height: 0;
        padding: 0;
    }

    .nav-dropdown.open:hover > .dropdown-menu {
        max-height: 500px;
        padding: 0.25rem 0;
    }

    .dropdown-menu li a {
        padding: 0.75rem 1.5rem 0.75rem 2.5rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    .dropdown-arrow {
        float: right;
        transition: transform 0.3s ease;
    }

    .nav-dropdown.open > a .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Donate button in mobile nav */
    .donate-nav-link {
        margin: 0.75rem 1.5rem !important;
        width: calc(100% - 3rem) !important;
        text-align: center;
        display: block !important;
        border-radius: var(--border-radius) !important;
    }

    /* Tablet: 2 columns for activity grid */
    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* Tablet: 3 columns for community grid */
    .community-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .community-card {
        min-height: 130px;
        padding: 1rem;
    }

    .community-card h3 {
        font-size: 1rem;
    }

    .community-card p {
        font-size: 0.8rem;
    }
}

/* ============================================
   Responsive Design - Phone (768px)
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        padding: 0.5rem 0;
    }

    .site-logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .phone-link {
        font-size: 0.9rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.125rem;
    }

    .section {
        padding: 2rem 0;
    }

    /* Mobile: 1 column for activity grid */
    .activity-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .activity-card {
        min-height: auto;
        padding: 1.5rem;
    }

    /* Mobile: 2 columns for community grid */
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .community-card {
        min-height: 120px;
        padding: 0.875rem;
    }

    .community-card h3 {
        font-size: 0.95rem;
    }

    .community-card p {
        font-size: 0.75rem;
    }

    .activity-count {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* ============================================
   Responsive Design - Small Phone (480px)
   ============================================ */
@media (max-width: 480px) {
    /* Small mobile: 1 column for both grids */
    .community-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .share-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .breadcrumbs {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    /* Improve button sizes for mobile */
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    /* Better spacing for containers */
    .container {
        padding: 0 15px;
    }

    /* Touch-friendly phone links */
    .phone-link {
        font-size: 0.85rem;
        padding: 0.5rem;
        display: inline-block;
    }

    /* Improve form inputs on mobile */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* Narrower mobile drawer */
    .nav-menu {
        width: 260px;
        right: -260px;
    }

    .nav-menu.active {
        right: 0;
    }
}
