/* ==========================================================================
   Angelica Grace Home - Responsive Formatting overrides
   ========================================================================== */

/* Large screens adjustments */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

/* Tablet screen layouts (max-width 1024px) */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.3rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Admin layout on tablet */
    .admin-wrapper {
        grid-template-columns: 80px 1fr;
    }
    .admin-sidebar {
        padding: 20px 10px;
        align-items: center;
    }
    .admin-logo span, .admin-nav-link span {
        display: none; /* Hide labels, show only icons */
    }
    .admin-logo i {
        font-size: 1.5rem;
    }
    .admin-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile layouts (max-width 768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .section {
        padding: 50px 0;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    
    .logo img {
        height: 55px;
        max-height: 55px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Responsive top navigation bar */
    .top-bar-info {
        justify-content: center;
        width: 100%;
    }
    .top-bar-socials {
        display: none;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 25px rgba(0, 90, 150, 0.1);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1000;
        transition: var(--transition-normal);
        padding: 40px;
    }

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

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Timeline routine adjustments for mobile */
    .timeline::before {
        left: 20px;
    }
    .timeline-dot {
        left: 20px;
    }
    .timeline-item {
        margin-bottom: 30px;
    }
    .timeline-item:nth-child(odd) {
        flex-direction: row;
    }
    .timeline-content {
        width: calc(100% - 40px);
        margin-left: 40px;
    }
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -10px;
        right: auto;
        border-right: 10px solid var(--white);
        border-left: none;
    }

    /* Testimonials and Gallery Grid */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-item {
        height: 180px;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-arrow {
        font-size: 1.5rem;
        padding: 5px 10px;
    }

    /* Contact Details Grid */
    .contact-section-grid {
        grid-template-columns: 1fr;
    }
    .contact-info-card, .contact-form-wrapper {
        padding: 25px;
    }

    /* Footer structure */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Admin layout on mobile (Collapsible overlay sidebar) */
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        height: 100vh;
        width: 260px;
        z-index: 1002;
        transition: var(--transition-normal);
        box-shadow: 5px 0 20px rgba(0,0,0,0.1);
    }
    .admin-sidebar.active {
        left: 0;
    }
    .admin-body {
        padding: 20px;
    }
    .admin-metrics-grid {
        grid-template-columns: 1fr;
    }

    /* Form & Message Modals */
    .modal-card {
        padding: 25px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Very Small Mobile viewports */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item {
        height: 220px;
    }
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
    }
}
