/* =========================================
   Servino Apps - Premium Website Styles
   ========================================= */

/* --- Variables & Theming --- */
:root {
    /* Color Palette */
    --primary-color: #2563eb;
    /* Deep Blue */
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;

    --secondary-color: #f59e0b;
    /* Amber/Orange for contrast */
    --secondary-light: #fbbf24;

    --success-color: #10b981;
    --dark-bg: #0f172a;
    /* Slate 900 */
    --darker-bg: #020617;
    /* Slate 950 */
    --glass-bg: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --glass-border: rgba(255, 255, 255, 0.1);

    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */

    /* Typography */
    --font-family: 'Cairo', sans-serif;

    /* Effects */
    --transition-speed: 0.3s;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --box-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Grid paper background pattern */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Dynamic Background Glows --- */
.background-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: pulseGlow 10s infinite alternate;
}

.glow-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
}

.glow-2 {
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    animation-delay: -5s;
    opacity: 0.3;
}

.glow-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    animation-duration: 15s;
    opacity: 0.2;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(50px, -50px);
    }
}

/* --- Typography Options --- */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header span {
    background: linear-gradient(to right, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- Glassmorphism Utilities --- */
.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary-color);
    width: 100%;
    margin-top: 1.5rem;
}

.btn-outline:hover {
    background: rgba(37, 99, 235, 0.1);
    color: white;
    border-color: var(--primary-light);
}


/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: background var(--transition-speed) ease, padding var(--transition-speed) ease;
}

.navbar.scrolled {
    background: rgba(2, 6, 23, 0.85);
    /* Darker Slate with opacity */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-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: white;
}

.app-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary-light);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-light), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-mockup {
    position: absolute;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 8px solid #1e293b;
    background: #0f172a;
    overflow: hidden;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mockup-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    gap: 1rem;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
}

.mockup-placeholder i {
    font-size: 3rem;
    color: var(--primary-light);
}

.primary-mockup {
    width: 280px;
    height: 580px;
    z-index: 2;
    right: 15%;
    animation: float 6s ease-in-out infinite;
}

.secondary-mockup {
    width: 250px;
    height: 520px;
    z-index: 1;
    left: 10%;
    top: 10%;
    opacity: 0.8;
    filter: blur(1px);
    animation: float 8s ease-in-out infinite alternate;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* --- Sections Common --- */
.section {
    padding: 6rem 0;
}

/* --- Apps Showcase Section --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.app-card {
    padding: 3rem 2rem;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.app-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.client-icon {
    background: rgba(30, 41, 59, 0.5);
    /* Subtle dark background to contrast the logo if needed, or transparent */
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.provider-icon {
    background: rgba(30, 41, 59, 0.5);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.app-card p {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.app-features-list {
    margin-bottom: 2rem;
}

.app-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.app-features-list li i {
    color: var(--success-color);
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: right;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--transition-speed);
}

.feature-item:hover {
    background: rgba(30, 41, 59, 0.6);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* --- Legal Pages Specific --- */
.legal-page {
    padding-top: 8rem;
}

.legal-content {
    padding: 3rem;
    margin-bottom: 4rem;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.updated-date {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
    border-right: 4px solid var(--primary-color);
    padding-right: 1rem;
}

.legal-section p {
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style-type: disc;
    padding-right: 2rem;
    margin-bottom: 1rem;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.legal-section strong {
    color: var(--text-primary);
}

/* --- Footer --- */
.footer {
    background: var(--darker-bg);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-light);
}

.footer-logo {
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    border: 1px solid var(--glass-border);
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    transition: all 0.3s;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary-light);
    padding-right: 8px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-light);
    font-weight: 600;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px) scale(1.1);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-wrapper {
        height: 500px;
    }

    .primary-mockup {
        right: 50%;
        transform: translateX(50%);
        animation: none;
    }

    .secondary-mockup {
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-info h3 {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        text-align: center;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .legal-content {
        padding: 1.5rem;
    }
}

/* --- Banners Section --- */
.banners-section {
    padding: 2rem 0 4rem;
}

.banner-slider {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    aspect-ratio: 21 / 9;
    background: rgba(30, 41, 59, 0.5);
}

.banner-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(2, 6, 23, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background var(--transition-speed);
}

.slider-btn:hover {
    background: var(--primary-color);
}

.prev-btn {
    right: 10px;
}

.next-btn {
    left: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.dot.active {
    background: var(--primary-light);
}

/* --- Ramadan Decorations --- */
.ramadan-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
}

.decoration-string {
    position: absolute;
    top: -20px;
    left: -5%;
    width: 110%;
    height: 50px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.lanterns-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 0 20px;
}

.lantern-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: swing 3s ease-in-out infinite alternate;
}

.lantern-item.drop {
    margin-top: 20px;
    animation-delay: -1s;
}

.lantern-item.drop-more {
    margin-top: 40px;
    animation-delay: -2s;
}

.rope {
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

.drop .rope {
    height: 50px;
}

.drop-more .rope {
    height: 70px;
}

.icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    animation: pulseLight 1.5s infinite alternate;
}

.glow-yellow {
    color: #facc15;
    filter: drop-shadow(0 0 15px #facc15);
}

.glow-red {
    color: #ef4444;
    filter: drop-shadow(0 0 15px #ef4444);
    font-size: 2.5rem;
    text-shadow: 0 0 10px #ef4444;
}

.glow-blue {
    color: #60a5fa;
    filter: drop-shadow(0 0 15px #60a5fa);
}

.glow-gold {
    color: #f59e0b;
    filter: drop-shadow(0 0 15px #f59e0b);
    font-size: 2.2rem;
    text-shadow: 0 0 10px #f59e0b;
}

@keyframes swing {
    0% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(-5deg);
    }
}

@keyframes pulseLight {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}