/* Design System for Al-Haq Digital Solutions */
:root {
    --primary: #0a7cff;
    --primary-hover: #006ae6;
    --secondary: #e2136e;
    --bg-dark: #0f1629;
    --bg-navbar: rgba(3, 7, 18, 0.85);
    --bg-footer: rgb(2, 4, 10);
    --bg-card: rgba(255, 255, 255, 0.02);
    --text-main: #ffffff;
    --text-muted: rgb(203, 213, 225);
    --border: rgba(255, 255, 255, 0.05);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-bn: 'Noto Sans Bengali', sans-serif;
    --font-arabic: 'Amiri', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

p {
    line-height: 32px;
}

/* Logo Styles */
.logo-arabic {
    font-family: var(--font-arabic);
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.logo-english {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
}

/* Typography */
h1 {
    font-size: 72px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2.16px;
    margin-bottom: 24px;
}

h2 {
    font-size: 48px;
    font-weight: 700;
}

.text-gradient {
    color: var(--primary); /* Removed gradient */
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 96px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    h1 {
        font-size: 48px;
    }
    .desktop-menu {
        display: none;
    }
    .mobile-menu-btn {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px; /* Better spacing for mobile */
    }
}

.section {
    padding: 5rem 0;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-outline {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tech Stack Tags */
.tech-tag {
    padding: 10px 20px;
    border-radius: 25px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s;
    color: white;
}

/* Custom Marquee for Reviews */
.marquee-container-custom {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 2rem 0;
}

.marquee-content-custom {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-marquee 12s linear infinite; /* Reduced speed by 50% */
    padding: 0 2rem;
}

.review-card-static {
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    min-width: 400px;
    max-width: 400px;
    flex-shrink: 0;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-container-custom:hover .marquee-content-custom {
    animation-play-state: paused;
}

/* Reviews Auto-Slider */
.reviews-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 2rem 0;
}

.reviews-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-reviews 40s linear infinite;
    padding: 0 2rem;
}

.reviews-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-reviews {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-33.33% - 1rem)); }
}

.review-card {
    flex: 0 0 350px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
}

/* Section Heights */
.hero {
    min-height: 60vh !important;
    padding: 15rem 0 4rem; /* Massive top padding for mobile gap */
}

.hero img {
    height: 60vh !important;
}

/* Grid Layouts */
.grid-horizontal {
    display: grid;
    grid-template-columns: 1fr; /* Stacked by default for mobile */
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-horizontal {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Portfolio Section Mobile Fix */
/* Portfolio Section Fix */
#project-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
}

#project-grid .card {
    padding: 0 !important;
}

@media (min-width: 768px) {
    #project-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    }
}

/* Animations */
@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-container {
    overflow: hidden;
    display: flex;
    width: 100%;
}

.marquee-content {
    display: flex;
    gap: 4rem;
    animation: scrollMarquee 40s linear infinite; /* Slower general marquee */
    padding: 2rem 0;
}

/* Team Card Styles */
.team-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
    border-radius: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(10, 124, 255, 0.2);
}

.team-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-card .role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Glassmorphism */
.glass {
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

/* Navigation */
nav {
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
}

/* Service Card Alignment Fix */
#services .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    #services .grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

#services .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#services .card p {
    flex-grow: 1; /* Pushes the button to the bottom */
}

/* Tech Stack Circles */
.project-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: white;
    padding: 1rem;
}

.tech-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s;
}

.tech-circle:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    background: rgba(10, 124, 255, 0.1);
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    h1 {
        font-size: 48px;
    }
    .desktop-menu {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block !important;
    }
}

/* Top Bar */
#top-bar {
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1001;
}

.top-bar-right span:hover {
    color: var(--primary);
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Language Toggle */
.lang-toggle {
    background: var(--border);
    border-radius: 2rem;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    padding: 0.25rem 0.75rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    padding: 3rem 2rem;
    position: relative;
    border-radius: 1.5rem;
    animation: scaleIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: flex-end;
    z-index: 3000;
}

.sidebar-content {
    background: var(--bg-dark); /* Ensure dark background */
    width: 70%;
    max-width: 300px;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

.sidebar-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-bottom: 3rem;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-links a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1000;
}

.whatsapp-text {
    background: white;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon {
    width: 50px;
    height: 50px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.whatsapp-float:hover .whatsapp-icon {
    transform: scale(1.1);
}

/* Footer Custom */
.footer-custom {
    background-color: var(--bg-footer);
    padding: 80px 0 48px;
}

.footer-container {
    padding: 0 96px;
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 20px;
    }
    .footer-custom {
        padding: 40px 0 24px;
    }
}
