/* ========================================
   alTiqani - Main Stylesheet
   ======================================== */

/* Fonts */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter.var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Variables */
:root {
    --purple: #5B2D8B;
    --purple-dark: #4a2573;
    --purple-light: #7b4aa8;
    --teal: #0FA3A3;
    --teal-dark: #0c8585;
    --teal-light: #12c4c4;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif;
    --header-height: 100px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

body.rtl {
    font-family: var(--font-ar);
    direction: rtl;
    text-align: right;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--teal-dark);
}

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

/* Anchor offset for fixed header */
section[id] {
    scroll-margin-top: var(--header-height);
}

/* Container */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 80px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--purple);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--purple);
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all 0.3s ease;
}

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

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

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

/* Mobile navigation dropdown */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    padding: 0.5rem 1.5rem;
}

.mobile-nav li {
    border-bottom: 1px solid var(--gray-100);
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav a {
    display: block;
    padding: 1rem 0;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 1rem;
}

.mobile-nav a:hover {
    color: var(--purple);
}

.mobile-nav .lang-toggle-mobile {
    color: var(--purple);
    font-weight: 600;
}

/* RTL mobile nav */
.rtl .mobile-nav ul {
    text-align: right;
}

/* Hero */
.hero {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 5rem;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: var(--white);
}

.hero-content {
    max-width: 720px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    text-align: center;
}

.about-text h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.highlight-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin: 0;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s ease;
}

.service-card:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 20px rgba(15, 163, 163, 0.1);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
    stroke-width: 2;
    fill: none;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Why Us */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.why-item {
    text-align: center;
    padding: 1.5rem;
}

.why-item-icon {
    width: 64px;
    height: 64px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.why-item-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--white);
    stroke-width: 2;
    fill: none;
}

.why-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.why-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--purple);
    stroke-width: 2;
    fill: none;
}

.contact-item p {
    color: var(--gray-700);
    font-size: 0.95rem;
}

.contact-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray-800);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 163, 163, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--purple-dark);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-700);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo img {
    height: 80px;
    width: auto;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* RTL adjustments */
.rtl .about-content {
    direction: rtl;
}

.rtl .about-text {
    text-align: center;
}

.rtl .contact-item {
    flex-direction: row-reverse;
}

.rtl .highlight-item {
    text-align: center;
}

.rtl .why-item {
    text-align: center;
}

.rtl .form-group input,
.rtl .form-group textarea {
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 88px;
    }
    
    .nav-links {
        display: none;
    }
    
    .lang-toggle {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        padding-top: calc(var(--header-height) + 1.5rem);
        padding-bottom: 4rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .about-highlights {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}
