/* ===== MOBILE RESPONSIVE STYLES ===== */
/* Afaq Distribution Company - Mobile Optimizations */

/* CSS Variables */
:root {
    --primary-green: #006847;
    --primary-green-dark: #004d35;
    --primary-green-light: #008055;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #1a1a1a;
    --text-gray: #6c757d;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 60px;
    right: -300px;
    width: 280px;
    height: calc(100vh - 60px);
    background: #ffffff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 10px;
}

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

.mobile-menu-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet - header is 80px */
@media (min-width: 769px) and (max-width: 992px) {
    .mobile-menu {
        top: 80px;
        height: calc(100vh - 80px);
    }
    .mobile-menu-overlay {
        top: 80px;
        height: calc(100vh - 80px);
    }
}

.mobile-menu-item {
    border-bottom: 1px solid #e9ecef;
}

.mobile-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.mobile-menu-link:hover {
    background: #f8f9fa;
    color: #006847;
}

.mobile-menu-link i {
    font-size: 12px;
    transition: transform 0.3s;
}

.mobile-menu-item.open .mobile-menu-link i {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    background: #f8f9fa;
}

.mobile-menu-item.open .mobile-submenu {
    display: block;
}

.mobile-submenu a {
    display: block;
    padding: 12px 20px 12px 35px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s;
}

.mobile-submenu a:hover {
    color: #006847;
    background: #ffffff;
}

.mobile-submenu a:last-child {
    border-bottom: none;
}

/* Tablet Screens */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .stats-grid,
    .team-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* الخدمات اللوجستية - اتنين جمب بعض */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sectors-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vision-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .slide-title {
        font-size: 32px;
    }

    .ceo-card {
        flex-direction: column;
        text-align: center;
    }
    
    .service-card {
        padding: 18px;
        min-height: 280px;
    }
    
    .service-card h3 {
        font-size: 14px;
    }
    
    .service-card p {
        font-size: 12px;
        line-height: 1.6;
    }
    
    /* Page content */
    .page-content {
        padding: 40px 0;
    }
    
    .content-section {
        padding: 40px 0;
    }
}

/* Mobile Screens */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-left {
        flex-direction: column;
        gap: 6px;
    }

    .hero-slider,
    .page-hero {
        height: 350px;
    }

    .slide-title,
    .hero-title {
        font-size: 22px;
        max-width: 100%;
    }
    
    .slide-desc,
    .hero-desc {
        font-size: 14px;
        max-width: 100%;
    }

    .stats-grid,
    .team-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* الخدمات اللوجستية - اتنين جمب بعض على الموبايل */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .service-card {
        padding: 15px;
        min-height: 260px;
    }
    
    .service-card h3 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .service-card p {
        font-size: 11px;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .service-tags {
        gap: 4px;
        margin-bottom: 8px;
    }
    
    .service-tag {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    .service-rating {
        margin-bottom: 10px;
    }
    
    .stars i {
        font-size: 12px;
    }
    
    .rating-count {
        font-size: 10px;
    }
    
    .service-actions {
        gap: 6px;
    }
    
    .btn-details {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .btn-favorite {
        width: 36px;
        height: 36px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .reviews-link-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    /* تحسينات القطاعات */
    .sectors-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sector-card {
        height: 200px;
    }
    
    /* تحسينات الـ Vision */
    .vision-section {
        padding: 50px 0;
    }
    
    .vision-image img {
        width: 100%;
        height: 250px;
    }
    
    .vision-content h2 {
        font-size: 24px;
    }
    
    .vision-content p {
        font-size: 14px;
    }
    
    /* تحسينات About */
    .about-section {
        padding: 50px 0;
    }
    
    .about-content h2 {
        font-size: 22px;
    }
    
    .about-content p {
        font-size: 13px;
    }
    
    /* تحسينات الفريق */
    .team-section {
        padding: 50px 0;
    }
    
    .team-intro h2 {
        font-size: 22px;
    }
    
    .ceo-card {
        padding: 25px;
    }
    
    .ceo-image {
        width: 100px;
        height: 100px;
    }
    
    .team-stat {
        padding: 15px;
    }
    
    .team-stat h4 {
        font-size: 20px;
    }
    
    /* تحسينات الشركاء */
    .partners-section {
        padding: 50px 0;
    }
    
    .partners-title {
        font-size: 20px;
    }
    
    .partners-grid {
        gap: 20px;
    }
    
    .partner-item {
        padding: 15px 20px;
    }
    
    .partner-item img {
        height: 50px;
    }
    
    /* تحسينات الـ Footer */
    .main-footer {
        padding: 40px 0 20px;
    }
    
    .footer-col h4 {
        font-size: 14px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    /* تحسينات الـ Modal */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 30px 20px;
    }
    
    .modal-header h2 {
        font-size: 22px;
    }
    
    .service-modal-body {
        padding: 20px;
    }
    
    .service-modal-body h2 {
        font-size: 20px;
    }
    
    .service-features {
        grid-template-columns: 1fr;
    }
    
    .service-cta {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    /* تحسينات Header */
    .header-container {
        height: 60px;
        padding: 0 15px;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
    
    .logo-text .main-name {
        font-size: 13px;
    }
    
    .logo-text .sub-name {
        font-size: 8px;
    }
    
    /* Slider navigation */
    .slider-nav {
        bottom: 20px;
        left: 20px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .slider-arrows {
        top: 15px;
        left: 15px;
    }
    
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    /* Page specific styles */
    .page-title {
        font-size: 28px;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
    
    /* Content sections */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .content-image img {
        height: 250px;
    }
    
    .info-box {
        padding: 20px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    /* Reviews page */
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .review-card {
        padding: 20px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 14px;
        padding: 12px;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-slider,
    .page-hero {
        height: 300px;
    }
    
    .slide-title,
    .hero-title {
        font-size: 18px;
    }
    
    .slide-desc,
    .hero-desc {
        font-size: 12px;
    }
    
    .services-grid {
        gap: 10px;
    }
    
    .service-card {
        padding: 12px;
        min-height: 240px;
    }
    
    .service-card h3 {
        font-size: 12px;
    }
    
    .service-card p {
        font-size: 10px;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .service-tag {
        font-size: 8px;
        padding: 2px 6px;
    }
    
    .btn-details {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .btn-favorite {
        width: 32px;
        height: 32px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .vision-content h2 {
        font-size: 20px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    /* Header أصغر للشاشات الصغيرة */
    .header-container {
        height: 55px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo-text .main-name {
        font-size: 12px;
    }
    
    .logo-text .sub-name {
        display: none;
    }
    
    /* Footer */
    .footer-about p {
        font-size: 11px;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-details,
    .btn-favorite,
    .btn-primary,
    .btn-secondary,
    .nav-link,
    .dropdown-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .slider-arrow,
    .slider-dot {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider,
    .page-hero {
        height: 280px;
    }
    
    .slide-title,
    .hero-title {
        font-size: 24px;
    }
}

/* Hide English sub-name on mobile */
@media (max-width: 768px) {
    .logo-text .sub-name {
        display: none !important;
    }
}

/* ===== REVIEWS PAGE MOBILE STYLES ===== */
/* Tablet */
@media (max-width: 992px) {
    .reviews-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .add-review-section {
        position: relative !important;
        top: 0 !important;
        order: -1;
    }
    
    .page-hero {
        padding: 60px 0 !important;
        margin-top: 80px;
    }
    
    .page-hero h1 {
        font-size: 32px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .reviews-container {
        gap: 20px !important;
    }
    
    .page-hero {
        padding: 40px 0 !important;
        margin-top: 60px;
    }
    
    .page-hero h1 {
        font-size: 24px !important;
    }
    
    .page-hero p {
        font-size: 14px !important;
    }
    
    .reviews-section {
        padding: 30px 0 !important;
    }
    
    .reviews-list-section h2 {
        font-size: 20px !important;
        text-align: center;
    }
    
    .filter-tabs {
        justify-content: center;
        gap: 8px !important;
    }
    
    .filter-tab {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    
    .review-card {
        padding: 18px !important;
    }
    
    .reviewer-avatar {
        width: 45px !important;
        height: 45px !important;
        font-size: 16px !important;
    }
    
    .reviewer-details h4 {
        font-size: 14px !important;
    }
    
    .reviewer-details span {
        font-size: 11px !important;
    }
    
    .review-rating i {
        font-size: 14px !important;
    }
    
    .review-text {
        font-size: 13px !important;
        line-height: 1.8 !important;
    }
    
    .review-service {
        padding: 6px 14px !important;
        font-size: 11px !important;
    }
    
    .add-review-section {
        padding: 20px !important;
        border-radius: 16px !important;
    }
    
    .add-review-section h2 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    
    .gmail-login-section {
        padding: 20px 15px !important;
    }
    
    .gmail-login-section p {
        font-size: 13px !important;
    }
    
    .gmail-btn {
        padding: 12px 20px !important;
        font-size: 13px !important;
    }
    
    .logged-in-user {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px !important;
        padding: 12px !important;
    }
    
    .logged-in-user span {
        font-size: 12px !important;
    }
    
    .form-group label {
        font-size: 13px !important;
    }
    
    .form-group select,
    .form-group textarea {
        padding: 12px !important;
        font-size: 13px !important;
    }
    
    .star-rating-input label {
        font-size: 26px !important;
    }
    
    .submit-review-btn {
        padding: 14px !important;
        font-size: 14px !important;
    }
    
    .success-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .success-icon i {
        font-size: 26px !important;
    }
    
    .success-message h3 {
        font-size: 18px !important;
    }
    
    .success-message p {
        font-size: 13px !important;
    }
    
    .breadcrumb {
        gap: 8px !important;
        margin-top: 15px !important;
    }
    
    .breadcrumb a,
    .breadcrumb .current {
        font-size: 12px !important;
    }
    
    .review-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .page-hero h1 {
        font-size: 20px !important;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tab {
        text-align: center;
    }
    
    .reviewer-info {
        gap: 10px !important;
    }
    
    .reviewer-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
    }
    
    .star-rating-input label {
        font-size: 22px !important;
    }
    
    .gmail-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
}
