/**
 * Capital Business Services - Responsive CSS
 * تصميم متجاوب احترافي
 */

/* ============================
   GLOBAL - عام لجميع الأحجام
   ============================ */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================
   TABLET & MOBILE - تابلت وموبايل
   (max-width: 991px)
   ============================ */
@media (max-width: 991px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Navbar */
    .navbar-brand img {
        max-height: 45px;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    /* Hero Slider */
    #heroSlider,
    #heroSlider .carousel-item {
        height: 50vh;
    }
    
    #heroSlider .carousel-item .hero-slide-bg {
        background-size: cover !important;
        background-position: center;
        width: 100%;
        height: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* ============================
   MOBILE ONLY - موبايل فقط
   (max-width: 767px)
   ============================ */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    /* Navbar */
    .navbar-brand img {
        max-height: 40px;
    }
    
    /* Hero Slider */
    #heroSlider,
    #heroSlider .carousel-item {
        height: 45vh;
    }
    
    #heroSlider .carousel-item .hero-slide-bg {
        background-size: cover !important;
        background-position: center;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
    }
    
    #heroSlider .carousel-control-prev,
    #heroSlider .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    #heroSlider .carousel-control-prev {
        left: 10px;
    }
    
    #heroSlider .carousel-control-next {
        right: 10px;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    /* Services */
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    /* Stats */
    .stats-section {
        padding: 30px 0;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Portfolio */
    .portfolio-item {
        margin-bottom: 1.5rem;
    }
    
    .portfolio-item img {
        height: auto;
        min-height: 200px;
        max-height: 300px;
        object-fit: cover;
    }
    
    /* Team */
    .team-member-img {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    /* Partners */
    .partner-logo {
        padding: 1rem;
    }
    
    .partner-logo img {
        max-height: 50px;
        width: auto;
        margin: 0 auto;
    }
    
    /* Testimonials */
    .testimonial-image-mobile {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
    }
    
    /* CTA */
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-section h2 {
        font-size: 1.75rem;
    }
    
    /* Footer */
    footer {
        padding: 30px 0 15px;
    }
    
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3,
    footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    footer h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    footer p,
    footer a {
        font-size: 0.9rem;
    }
    
    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
    }
    
    .footer-logo {
        max-height: 40px;
        max-width: 120px;
        margin-bottom: 0.5rem;
    }
    
    .social-links a {
        font-size: 1.2rem;
        margin: 0 0.5rem 0.5rem 0;
    }
    
    /* Licenses - إصلاح الشهادات */
    .licenses-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .licenses-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .license-badge {
        width: 60px;
        height: 40px;
        padding: 0.25rem;
        background: white;
        border-radius: 0.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .license-image {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .contact-info li {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
}

/* ============================
   SMALL MOBILE - موبايل صغير
   (max-width: 575px)
   ============================ */
@media (max-width: 575px) {
    /* Hero */
    #heroSlider,
    #heroSlider .carousel-item {
        height: 40vh;
    }
    
    #heroSlider .carousel-item .hero-slide-bg {
        background-size: cover !important;
        background-position: center;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
    }
    
    .hero-title {
        font-size: 1.35rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Portfolio */
    .portfolio-item img {
        min-height: 180px;
        max-height: 250px;
    }
    
    /* Team */
    .team-member-img {
        width: 100px;
        height: 100px;
    }
    
    /* Partners */
    .partner-logo img {
        max-height: 40px;
    }
    
    /* Testimonials */
    .testimonial-image-mobile {
        width: 70px;
        height: 70px;
    }
    
    /* Footer */
    .footer-logo {
        max-height: 35px;
        max-width: 100px;
    }
    
    /* Licenses */
    .license-badge {
        width: 55px;
        height: 38px;
    }
}

/* ============================
   EXTRA SMALL MOBILE - موبايل صغير جداً
   (max-width: 374px)
   ============================ */
@media (max-width: 374px) {
    /* Hero */
    #heroSlider,
    #heroSlider .carousel-item {
        height: 45vh;
    }
    
    #heroSlider .carousel-item .hero-slide-bg {
        background-size: cover !important;
        background-position: center;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.35rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Portfolio */
    .portfolio-item img {
        min-height: 150px;
        max-height: 200px;
    }
    
    /* Team */
    .team-member-img {
        width: 90px;
        height: 90px;
    }
    
    /* Partners */
    .partner-logo img {
        max-height: 35px;
    }
    
    /* Testimonials */
    .testimonial-image-mobile {
        width: 60px;
        height: 60px;
    }
    
    /* Licenses */
    .license-badge {
        width: 50px;
        height: 35px;
    }
}
