/* =========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Mobile-First Approach for All Devices
   ========================================= */

/* Tablet and below (900px) */
@media (max-width: 900px) {

    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        padding: 40px;
        transition: 0.4s ease;
        border-radius: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        padding: 15px 0;
        font-size: 1.1rem;
    }

    /* Hero Section */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Grids */
    .grid-2,
    .footer-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Services */
    .service-block,
    .service-block.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .service-img {
        height: 300px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Events/Memories */
    .events-grid {
        grid-template-columns: 1fr;
    }

    .admin-header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
    }
}

/* Mobile (600px and below) */
@media (max-width: 600px) {

    /* Container */
    .container {
        padding: 0 20px;
    }

    .section-padding {
        padding: 60px 0;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
    }

    /* Page Header */
    .page-header {
        padding: 100px 0 60px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.8rem;
    }

    /* Buttons */
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 25px;
    }

    /* Services */
    .service-card {
        padding: 30px 20px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Blog */
    .blog-card {
        padding: 20px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
        gap: 15px;
    }

    .newsletter-input {
        width: 100%;
    }

    /* Contact */
    .contact-info-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .contact-form-box {
        padding: 30px 20px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 10px 20px;
    }

    .admin-main {
        padding: 15px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-card {
        padding: 20px;
    }

    .content-type-selector {
        flex-direction: column;
    }

    .type-btn {
        padding: 20px;
    }

    .blog-posts-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .image-upload-area {
        padding: 30px 20px;
    }

    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

    .quick-action-card {
        padding: 20px;
    }

    .event-card {
        padding: 20px;
    }

    .password-input-group {
        flex-direction: column;
    }

    .password-input-group .btn {
        width: 100%;
    }

    /* Login Page */
    .login-card {
        padding: 40px 25px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }
}

/* Small Mobile (400px and below) */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .stat-card h3 {
        font-size: 1.8rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .admin-main {
        padding: 10px;
    }

    .admin-card {
        padding: 15px;
    }

    .form-control {
        font-size: 14px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .page-header {
        padding: 80px 0 40px;
    }

    .nav-menu {
        padding: 20px;
        justify-content: flex-start;
        overflow-y: auto;
    }
}

/* Tablet Landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar {
        width: 200px;
    }

    .admin-main {
        margin-left: 200px;
    }

    .admin-nav-link span,
    .admin-nav-menu a span {
        display: inline;
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .section-title h2 {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {

    .admin-sidebar,
    .hamburger,
    .btn,
    .newsletter,
    footer,
    .breadcrumb {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    body {
        background: white;
    }

    .admin-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .hero,
    .page-header {
        background-size: cover;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 998;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

@media (max-width: 600px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Overlay for mobile menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-overlay.active {
    display: block;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-link,
    .admin-nav-link {
        min-height: 44px;
        min-width: 44px;
    }

    .hamburger {
        padding: 10px;
    }
}