/* Mobile-specific styles for PGFTU website */

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 4px;
        transition: var(--transition);
    }

    .mobile-menu-toggle:hover {
        background: var(--light-bg);
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 1rem;
        display: none;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        justify-content: center;
        padding: 1rem;
        border-radius: var(--border-radius-sm);
        margin-bottom: 0.5rem;
    }

    .nav-link:hover {
        transform: none;
    }

    /* Header adjustments */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .site-title h1 {
        font-size: 1.2rem;
    }

    .language-switcher {
        margin-top: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .language-btn,
    .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Content adjustments */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-grid:has(.main-content:empty) {
        grid-template-columns: 1fr !important;
    }

    .main-content,
    .sidebar {
        padding: 1rem;
        border-radius: var(--border-radius-sm);
    }

    .main-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .main-container:has(.main-content:empty) {
        margin: 0 auto;
    }

    /* Sidebar adjustments */
    .sidebar {
        position: static;
        margin-top: 1rem;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .sidebar-item {
        margin-bottom: 0;
    }

    .sidebar-link {
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .sidebar-image {
        height: 100px;
    }

    /* RTL and LTR adjustments for mobile */
    .rtl .content-grid,
    .ltr .content-grid {
        grid-template-columns: 1fr;
    }

    .rtl .main-content,
    .rtl .sidebar,
    .ltr .main-content,
    .ltr .sidebar {
        order: unset;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .main-header {
        padding: 0.5rem 0;
    }

    .logo-section img {
        max-height: 50px;
    }

    .language-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        margin-left: 0.3rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        padding: 0.5rem;
    }

    .nav-link {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 0.8rem;
    }

    .sidebar {
        padding: 0.8rem;
    }

    .sidebar-menu {
        grid-template-columns: 1fr;
    }

    .sidebar-link {
        padding: 1rem;
    }

    .footer-content {
        font-size: 0.9rem;
    }
}

/* Landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .header-content {
        flex-direction: row;
        text-align: left;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .sidebar-link:hover,
    .language-btn:hover,
    .login-btn:hover {
        transform: none;
    }

    .nav-link:active,
    .sidebar-link:active,
    .language-btn:active,
    .login-btn:active {
        transform: scale(0.95);
    }

    /* Increase touch targets */
    .nav-link,
    .sidebar-link,
    .language-btn,
    .login-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    .nav-link::before,
    .sidebar-link::before {
        display: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-section img,
    .sidebar-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles for mobile */
@media print and (max-width: 768px) {
    .main-nav,
    .sidebar,
    .language-switcher,
    .mobile-menu-toggle {
        display: none !important;
    }

    .main-container {
        margin: 0 !important;
        padding: 0 !important;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
    }

    .main-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        padding: 0.5rem !important;
    }

    .main-header {
        background: white !important;
        color: black !important;
        padding: 0.5rem 0 !important;
    }

    .logo-section img {
        filter: grayscale(100%);
    }
}

/* Accessibility improvements for mobile */


/* Performance optimizations for mobile */
 

/* Homepage content adjustments */
.homepage-content {
    gap: 1rem;
}

.main-homepage-image {
    max-height: 200px;
    min-height: 150px;
}

.welcome-section {
    padding: 1rem;
    gap: 1rem;
}

.pgftu-logo {
    max-width: 150px;
}

.welcome-text h2 {
    font-size: 1.5rem;
}

.welcome-text h3 {
    font-size: 1.2rem;
}

.welcome-text p {
    font-size: 1rem;
} 

/* News Mobile Styles */
@media (max-width: 768px) {
    .news-item {
        margin-bottom: 1.5rem;
    }

    .news-header {
        padding: 1rem 1rem 0;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .news-image {
        padding: 0 1rem;
    }

    .news-thumbnail {
        max-height: 150px;
    }

    .news-excerpt {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .news-footer {
        padding: 0 1rem 1rem;
    }

    .read-more {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* News Detail Mobile */
    .news-detail {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .news-detail-image {
        max-height: 250px;
        margin-bottom: 1rem;
    }

    .news-content {
        max-width: 100%;
    }

    .news-body {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .no-news {
        padding: 2rem 1rem;
    }

    .no-news p {
        font-size: 1rem;
    }
} 

/* Content Detail Mobile */
.content-detail {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-detail-image {
    max-height: 250px;
    margin-bottom: 1rem;
}

.content-body {
    max-width: 100%;
}

.content-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.content-text {
    font-size: 0.9rem;
    line-height: 1.6;
} 

/* Footer Mobile */
.main-footer {
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-content {
    gap: 0.8rem;
}

.footer-content p {
    font-size: 0.9rem;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-content i {
    font-size: 1rem;
    padding: 0.4rem;
}

.footer-link {
    padding: 0.25rem 0.6rem;
    font-size: 0.9rem;
}

.footer-divider {
    width: 40px;
    height: 2px;
    margin: 0.8rem auto;
}

.footer-copyright {
    font-size: 0.8rem;
} 

/* Scroll to Top Mobile */
.scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
} 

    /* Info Mobile */
    .info-item {
        margin-bottom: 1.5rem;
    }

    .info-header {
        padding: 1rem 1rem 0;
    }

    .info-title {
        font-size: 1.1rem;
    }

    .info-excerpt {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .info-footer {
        padding: 0 1rem 1rem;
    }

    .no-info {
        padding: 2rem 1rem;
    }

    .no-info p {
        font-size: 1rem;
    } 