/* Responsive Design Stylesheet */
:root {
    --primary-color: #1080f0;
    --secondary-color: #000000;
    --accent-color: #999999;
    --text-color: #000000;
    --light-color: #ffffff;
    --dark-color: #000000;
}

/* Base responsive settings */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }
}

/* Responsive Typography */
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14.5px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 13px;
    }
}

/* Header Responsive Styles */
@media (max-width: 992px) {
    header .container {
        padding: 10px 15px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .company-name {
        font-size: 0.75rem;
    }
    
    .company-name span {
        font-size: 0.7rem;
    }
    
    .vision2030 {
        height: 35px;
    }
    
    nav ul li {
        margin-left: 20px;
    }
    
    html[dir="rtl"] nav ul li {
        margin-right: 20px;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 0;
        display: block !important;
        visibility: visible !important;
    }
    
    header .container {
        padding: 8px 16px;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo-container {
        display: flex !important;
        align-items: center;
    }
    
    .logo-img {
        height: 40px;
        display: block !important;
    }
    
    .company-names {
        display: none;
    }
    
    .vertical-divider {
        display: none;
    }
    
    .vision2030 {
        height: 30px;
        margin-left: 10px;
    }
    
    html[dir="rtl"] .vision2030 {
        margin-right: 10px;
        margin-left: 0;
    }
    
    /* Mobile Menu */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: rgba(16, 128, 240, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(16, 128, 240, 0.3);
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(26, 26, 26, 0.98) 100%);
        backdrop-filter: blur(20px);
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px 0 30px;
        border-left: 1px solid rgba(16, 128, 240, 0.3);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    html[dir="rtl"] nav {
        right: auto;
        left: -100%;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: none;
        border-right: 1px solid rgba(16, 128, 240, 0.3);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    nav.active {
        right: 0;
    }
    
    html[dir="rtl"] nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column !important;
        width: 100%;
        gap: 0 !important;
        padding: 0;
        display: flex !important;
    }
    
    nav ul li {
        margin: 0 !important;
        width: 100%;
        display: block !important;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    html[dir="rtl"] nav ul li {
        margin: 0 !important;
        text-align: right;
    }
    
    nav ul li:first-child {
        border-top: none;
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        display: block !important;
        width: 100%;
        padding: 20px 24px !important;
        font-size: 1.05rem !important;
        font-weight: 500;
        border-radius: 0 !important;
        margin: 0 !important;
        transition: all 0.3s ease;
        color: #ffffff;
        text-decoration: none;
        text-align: left;
    }
    
    html[dir="rtl"] nav ul li a {
        text-align: right;
    }
    
    nav ul li a:hover,
    nav ul li a:active {
        background: rgba(16, 128, 240, 0.2);
        color: #1080f0;
        padding-left: 32px;
    }
    
    html[dir="rtl"] nav ul li a:hover,
    html[dir="rtl"] nav ul li a:active {
        padding-left: 24px;
        padding-right: 32px;
    }
    
    .book-consultation-btn {
        background: linear-gradient(135deg, #1080f0 0%, #0066cc 100%) !important;
        color: white !important;
        margin: 8px 16px !important;
        border-radius: 8px !important;
        padding: 14px 24px !important;
        text-align: center;
        border: none !important;
    }
    
    .book-consultation-btn:hover {
        background: linear-gradient(135deg, #0066cc 0%, #1080f0 100%) !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 128, 240, 0.4);
        padding-left: 24px !important;
    }
    
    .language-selector {
        margin: auto 24px 0;
        display: block !important;
        text-align: left;
    }
    
    html[dir="rtl"] .language-selector {
        text-align: right;
    }
    
    .language-selector .language-link {
        display: inline-block;
        padding: 10px 20px;
        background: rgba(16, 128, 240, 0.2);
        border: 1px solid rgba(16, 128, 240, 0.4);
        border-radius: 8px;
    }
}

/* Mobile Menu Backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-backdrop.active {
    display: block;
    opacity: 1;
}

@media (min-width: 769px) {
    .nav-backdrop {
        display: none !important;
    }
}

/* Hero Section Responsive */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .merge-animation-container {
        height: 450px;
    }
}

@media (max-width: 768px) {
    #hero {
        padding: 100px 0 50px;
        min-height: 90vh;
    }
    
    .hero-content {
        padding: 0 16px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .merge-animation-container {
        height: 400px;
    }
    
    #cloud-image, .scs-cloud-img {
        width: 90%;
    }
    
    #kloth-image, .scs-mountain-img {
        width: 130%;
    }
}

@media (max-width: 576px) {
    header {
        padding: 8px 0;
    }
    
    header .container {
        padding: 6px 12px;
    }
    
    .logo-img {
        height: 36px;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    #hero {
        padding: 80px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 1.9rem;
        margin-bottom: 16px;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    
    .merge-animation-container {
        height: 350px;
    }
    
    #cloud-image, .scs-cloud-img {
        width: 95%;
    }
    
    #kloth-image, .scs-mountain-img {
        width: 140%;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Services Section Responsive */
@media (max-width: 992px) {
    #services {
        padding: 80px 0;
    }
    
    #services h2 {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    #services {
        padding: 50px 0;
    }
    
    #services h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .services-grid-modern {
        gap: 20px;
    }
    
    .service-card-modern {
        padding: 24px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
        padding: 20px 20px 0;
    }
    
    .service-card p {
        padding: 0 20px;
    }
    
    .service-card .read-more {
        padding: 0 20px 20px;
    }
}

@media (max-width: 576px) {
    #services {
        padding: 40px 0;
    }
    
    #services h2 {
        font-size: 1.8rem;
        margin-bottom: 24px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid-modern {
        gap: 16px;
    }
    
    .service-card-modern {
        padding: 20px;
    }
    
    .service-card-modern h3 {
        font-size: 1.2rem;
    }
    
    .service-card-modern p {
        font-size: 0.9rem;
    }
}

/* Technologies Section Responsive */
@media (max-width: 992px) {
    #technologies {
        padding: 80px 0;
    }
    
    #technologies h2 {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .tech-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .tech-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    #technologies {
        padding: 50px 0;
    }
    
    #technologies h2 {
        font-size: 2rem;
        margin-bottom: 24px;
    }
    
    .partners-track img {
        height: 50px !important;
        padding: 12px 20px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    #technologies {
        padding: 40px 0;
    }
    
    #technologies h2 {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }
    
    .partners-track img {
        height: 45px !important;
        max-width: 120px !important;
        padding: 10px 18px;
    }
    
    .presence-track img {
        height: 70px !important;
        width: 70px !important;
        min-width: 70px !important;
        min-height: 70px !important;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tech-icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .tech-name {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .tech-description {
        font-size: 0.85rem;
    }
}

/* Contact Section Responsive */
@media (max-width: 992px) {
    #contact {
        padding: 80px 0;
    }
    
    #contact h2 {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
    
    .contact-container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    #contact {
        padding: 50px 0;
    }
    
    #contact h2 {
        font-size: 2rem;
        margin-bottom: 24px;
    }
    
    .contact-form {
        padding: 28px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
}

@media (max-width: 576px) {
    #contact {
        padding: 40px 0;
    }
    
    #contact h2 {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }
    
    .contact-form {
        padding: 24px 20px;
    }
    
    .contact-form h3 {
        font-size: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    .contact-form .btn {
        padding: 12px;
    }
    
    .contact-item {
        gap: 10px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-details h3 {
        font-size: 1.1rem;
    }
}

/* Footer Responsive */
@media (max-width: 992px) {
    footer {
        padding: 50px 0 20px;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-logo, .footer-links, .footer-social, .footer-contact {
        flex: 0 0 45%;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 50px 0 24px;
    }
    
    footer .container {
        padding: 0 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-logo, .footer-links, .footer-social, .footer-contact {
        flex: 0 0 100%;
        text-align: center;
    }
    
    .footer-logo {
        margin-bottom: 20px;
    }
    
    .footer-links h3::after,
    .footer-social h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    html[dir="rtl"] .footer-links h3::after,
    html[dir="rtl"] .footer-social h3::after,
    html[dir="rtl"] .footer-contact h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 40px 0 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        padding-top: 16px;
    }
    
    .footer-bottom p {
        margin-bottom: 12px;
        font-size: 0.85rem;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-logo .logo-img {
        height: 50px;
    }
}

/* Language Selector Responsive */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 10px;
    }
    
    html[dir="rtl"] .language-selector {
        margin-right: 10px;
        margin-left: 0;
    }
    
    #language-toggle, .language-link {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
}

/* Loading Animation Responsive */
@media (max-width: 768px) {
    .scs-logo-container {
        height: 220px;
        width: 220px;
    }
    
    .scs-loading-circle {
        border-width: 3px;
    }
}

@media (max-width: 576px) {
    .scs-logo-container {
        height: 180px;
        width: 180px;
    }
}

/* Fix for mobile overflow issues */
.row {
    margin-left: 0;
    margin-right: 0;
}

[class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Utility classes for responsive design */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

@media (min-width: 576px) {
    .d-sm-none {
        display: none !important;
    }
    
    .d-sm-block {
        display: block !important;
    }
    
    .d-sm-flex {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    
    .d-md-block {
        display: block !important;
    }
    
    .d-md-flex {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
    
    .d-lg-block {
        display: block !important;
    }
    
    .d-lg-flex {
        display: flex !important;
    }
}

@media (min-width: 1200px) {
    .d-xl-none {
        display: none !important;
    }
    
    .d-xl-block {
        display: block !important;
    }
    
    .d-xl-flex {
        display: flex !important;
    }
}

/* Responsive spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ml-0 { margin-left: 0 !important; }
.mr-0 { margin-right: 0 !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.ml-1 { margin-left: 0.25rem !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }

.mt-2 { margin-top: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }

.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ml-3 { margin-left: 1rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }

.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }

.mt-5 { margin-top: 3rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.ml-5 { margin-left: 3rem !important; }
.mr-5 { margin-right: 3rem !important; }
.mx-5 { margin-left: 3rem !important; margin-right: 3rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

/* Responsive text alignment */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

@media (min-width: 576px) {
    .text-sm-center {
        text-align: center !important;
    }
    
    .text-sm-left {
        text-align: left !important;
    }
    
    .text-sm-right {
        text-align: right !important;
    }
}

@media (min-width: 768px) {
    .text-md-center {
        text-align: center !important;
    }
    
    .text-md-left {
        text-align: left !important;
    }
    
    .text-md-right {
        text-align: right !important;
    }
}

@media (min-width: 992px) {
    .text-lg-center {
        text-align: center !important;
    }
    
    .text-lg-left {
        text-align: left !important;
    }
    
    .text-lg-right {
        text-align: right !important;
    }
}

/* Fix for RTL text alignment in responsive modes */
html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .text-right {
    text-align: left !important;
}

@media (min-width: 576px) {
    html[dir="rtl"] .text-sm-left {
        text-align: right !important;
    }
    
    html[dir="rtl"] .text-sm-right {
        text-align: left !important;
    }
}

@media (min-width: 768px) {
    html[dir="rtl"] .text-md-left {
        text-align: right !important;
    }
    
    html[dir="rtl"] .text-md-right {
        text-align: left !important;
    }
}

@media (min-width: 992px) {
    html[dir="rtl"] .text-lg-left {
        text-align: right !important;
    }
    
    html[dir="rtl"] .text-lg-right {
        text-align: left !important;
    }
}
