/* ============================================
   KINGDOM OF KOOKI - RESPONSIVE STYLESHEET
   Mobile-First Responsive Design
   ============================================ */

/* ============================================
   TABLET (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

    /* Header */
    .site-title {
        font-size: 2rem;
    }

    .kingdom-logo {
        max-height: 60px;
    }

    /* Navigation */
    .nav-menu {
        gap: 0;
    }

    .menu-item > a {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Grid System */
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Section */
    .section {
        padding: 40px 0;
    }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Header */
    .header-top {
        padding: 15px 0;
    }

    .logo-section {
        flex-direction: column;
        gap: 10px;
    }

    .kingdom-logo {
        max-height: 50px;
    }

    .site-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .site-tagline {
        font-size: 0.9rem;
    }

    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-navy);
        flex-direction: column;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 1000px;
    }

    .menu-item {
        width: 100%;
    }

    .menu-item > a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding-left: 40px;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .social-icons {
        gap: 15px;
        margin: 30px 0;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    /* Cards */
    .card-body {
        padding: 20px;
    }

    /* Blog Grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Sidebar */
    .sidebar {
        margin-top: 30px;
        padding: 20px;
    }

    /* Row */
    .row {
        margin: 0 -10px;
    }

    .col, [class*="col-"] {
        padding: 0 10px;
    }

    /* Grid System - Mobile Stack */
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Scroll to Top */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }

    /* Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Personnel Cards */
    .personnel-grid {
        grid-template-columns: 1fr;
    }

    /* Events Grid */
    .events-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .section-title h2 {
        font-size: 1.75rem;
    }

    /* Header */
    .site-title {
        font-size: 1.25rem;
    }

    .site-tagline {
        font-size: 0.85rem;
    }

    .menu-label {
        font-size: 12px;
    }

    /* Footer */
    .site-footer {
        padding: 40px 0 15px;
        margin-top: 40px;
    }

    .footer-column h3 {
        font-size: 16px;
    }

    .footer-column a {
        font-size: 13px;
    }

    .footer-copyright p {
        font-size: 12px;
    }

    /* Social Icons */
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Cards */
    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }

    .page-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    /* Hide navigation and footer */
    .site-header,
    .main-navigation,
    .site-footer,
    .scroll-to-top,
    .breadcrumb,
    .sidebar,
    .btn {
        display: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    /* Avoid page breaks inside elements */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, li {
        page-break-inside: avoid;
    }

    /* Show URLs for links */
    a[href]::after {
        content: " (" attr(href) ")";
    }

    /* Remove shadows and backgrounds */
    .card,
    .alert {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-menu.active {
        max-height: 400px;
        overflow-y: auto;
    }
}

/* ============================================
   HIGH RESOLUTION DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .kingdom-logo {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional Future Enhancement)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --white: #1a1a1a;
        --black: #ffffff;
        --text-dark: #e0e0e0;
        --text-light: #a0a0a0;
        --light-gray: #2a2a2a;
    }
    */
}
