/* 
   Softify Techs - Main Premium Stylesheet
   Futuristic, Dark & Deep Tech Vibe, Clean Responsive Layout
*/

:root {
    /* Color Palette */
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #06b6d4; /* Cyan */
    --accent: #d946ef; /* Violet */
    --success: #10b981;
    --danger: #ef4444;
    
    /* Dark Theme Default */
    --bg-main: #0b0f19;
    --bg-sec: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --border-card: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --navbar-bg: rgba(11, 15, 25, 0.85);
    
    /* Font sizes & styling */
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-ar: 'Cairo', 'Tajawal', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-sec: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-card: rgba(0, 0, 0, 0.06);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --navbar-bg: rgba(248, 250, 252, 0.9);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    line-height: 1.6;
}

.rtl {
    font-family: var(--font-ar);
}

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

/* Glow Backgrounds */
.ambient-glow {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

.glow-top-right { top: -10%; right: -10%; }
.glow-bottom-left { bottom: 10%; left: -10%; }

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-card);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.logo-icon {
    color: var(--secondary);
    animation: pulse 2s infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

.rtl .nav-link::after {
    left: auto;
    right: 0;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.nav-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme & Lang Controls */
.controls-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .lang-toggle {
    background: none;
    border: 1px solid var(--border-card);
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-toggle:hover, .lang-toggle:hover {
    border-color: var(--primary);
    background-color: var(--border-card);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 40%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 40%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.btn-secondary {
    background: var(--bg-sec);
    color: var(--text-main);
    border: 1px solid var(--border-card);
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background-color: var(--border-card);
}

.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-svg-wrapper {
    width: 100%;
    max-width: 450px;
    animation: float 6s ease-in-out infinite;
}

/* Stats Section */
.stats {
    padding: 60px 0;
    border-top: 1px solid var(--border-card);
    border-bottom: 1px solid var(--border-card);
    background-color: rgba(17, 24, 39, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Services Grid & Cards (Glassmorphism) */
.section {
    padding: 100px 0;
    position: relative;
}

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

.section-subtitle {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.card-link:hover {
    gap: 0.75rem;
}

/* Portfolio Filters and Carousel */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-sec);
    color: var(--text-muted);
    border: 1px solid var(--border-card);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-img-wrapper {
    overflow: hidden;
    position: relative;
    height: 220px;
}

.portfolio-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-cat {
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.portfolio-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.portfolio-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.portfolio-meta {
    margin-top: auto;
    border-top: 1px solid var(--border-card);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.portfolio-meta strong {
    color: var(--text-main);
}

/* Testimonials Carousel */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slide {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.client-rating {
    color: #fbbf24;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.client-feedback {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-main);
    line-height: 1.6;
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.client-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.client-details h4 {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
}

.rtl .client-details h4 {
    text-align: right;
}

.client-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: left;
}

.rtl .client-details p {
    text-align: right;
}

/* FAQ Accordion */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-icon {
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Quote Calculator Wizard Styles */
.quote-wizard {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1.5rem;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
}

.wizard-progress::after {
    content: '';
    position: absolute;
    height: 2px;
    background-color: var(--border-card);
    width: 100%;
    top: 50%;
    left: 0;
    z-index: 1;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-sec);
    border: 2px solid var(--border-card);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.progress-step.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.progress-step.completed {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Grid layout for select options */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-box {
    border: 1px solid var(--border-card);
    background-color: rgba(255,255,255,0.02);
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.option-box input {
    display: none;
}

.option-box i {
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.option-box span {
    font-weight: 600;
    font-size: 0.9rem;
}

.option-box:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.option-box.selected {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 10px rgba(99,102,241,0.2);
}

.option-box.selected i {
    color: var(--primary);
}

/* Price Estimate Panel inside wizard */
.price-estimate-panel {
    background-color: rgba(16, 185, 129, 0.05);
    border: 1px dashed var(--success);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--success);
    margin-top: 0.25rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border-card);
    border-radius: 0.5rem;
    background-color: var(--bg-sec);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

/* Wizard actions footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    border-top: 1px solid var(--border-card);
    padding-top: 1.5rem;
}

/* Contact Us Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.info-details h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.info-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer Section */
.footer {
    background-color: var(--bg-sec);
    border-top: 1px solid var(--border-card);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 0.25rem;
}

.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: 0.25rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.social-btn:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--border-card);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Floating Actions Buttons (WhatsApp & Quote request trigger) */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.rtl .floating-actions {
    right: auto;
    left: 30px;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.floating-whatsapp {
    background-color: #25d366;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.floating-quote {
    background-color: var(--primary);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Layouts */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-main);
        flex-direction: column;
        padding: 3rem 1.5rem;
        gap: 2rem;
        transition: var(--transition);
        border-top: 1px solid var(--border-card);
        align-items: stretch;
    }
    
    .rtl .nav-menu {
        left: auto;
        right: -100%;
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .rtl .nav-menu.open {
        right: 0;
    }
    
    .nav-toggle-btn {
        display: block;
    }
    
    .controls-group {
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .rtl .controls-group {
        margin-right: auto;
        margin-left: 1rem;
    }
}
