/* app/assets/stylesheets/landing.css */

/* Custom Properties */
:root {
    --vh: 1vh;
    --primary-blue: #326eb4;
    --primary-green: #8ca83f;
    --gradient-blue: linear-gradient(135deg, #326eb4, #4a90e2);
    --gradient-green: linear-gradient(135deg, #8ca83f, #a4c555);
}

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

@supports (-webkit-touch-callout: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }

    body {
        min-height: -webkit-fill-available;
    }
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #333;
    overflow-x: hidden;
    margin: 0;
    /* Add mobile viewport padding */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    min-height: 100vh;
    /* Use CSS variable for dynamic viewport height */
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Header Styles */
.sticky-header {
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.sticky-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #326eb4, #4a90e2);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    animation: backgroundMove 20s linear infinite;
}

/* Animated Background Pattern */
@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

/* Wave Effect */
/* Replace the Wave Effect section with this Angular Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(0deg); /* Remove the rotation */
}

.wave-divider svg {
    position: relative;
    display: block;
    width: 100%;
    height: 150px;
    fill: white;
}

/* Add this to create the angular shape */
.wave-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: white;
    clip-path: polygon(0 100%, 100% 100%, 100% 40%, 0 100%);
}

/* Animated Gradient Border */
.gradient-border {
    position: relative;
    border-radius: 0.5rem;
    background: white;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    border-radius: 0.6rem;
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Client & Transporter Sections */
.section-blue {
    background-color: var(--primary-blue);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,0.1) 25%, transparent 25%);
    background-position: 10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px;
    background-repeat: repeat;
}

.section-green {
    background-color: var(--primary-green);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,0.1) 25%, transparent 25%);
    background-position: 10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px;
    background-repeat: repeat;
}

/* Modern Button Styles */
.btn-primary {
    background: var(--gradient-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(50, 110, 180, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 110, 180, 0.3);
}

/* FAQ Section */
.faq-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    background: white;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(50, 110, 180, 0.05);
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Language Selector */
.lang-selector {
    position: relative;
    z-index: 50;
}

.lang-selector-dropdown {
    min-width: 150px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Contact Form */
.contact-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.contact-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(50, 110, 180, 0.1);
}

/* Social Media Icons */
.social-icon {
    color: #666;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: var(--primary-blue);
}

/* RTL Support */
[dir="rtl"] .hero-gradient::before {
    transform-origin: right top;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 6rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        width: 100%;
    }

    .video-container {
        margin: 2rem 0;
    }
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* app/assets/stylesheets/components/_animations.css */

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Hover animations */
.feature-card {
    transition: all 0.3s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Gradient text animation */
.gradient-text {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* app/assets/stylesheets/components/_header.css */

.fixed-header {
    transition: all 0.3s ease;
}

/* Active state for nav links */
.nav-link.active {
    color: var(--logistech-blue);
}

/* Ensure smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Mobile menu styles */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.hidden {
    transform: translateX(-100%);
}

@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 80px; /* header height */
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* app/assets/stylesheets/components/_how_it_works.css */

/* Video container aspect ratio */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Smooth shadow transition */
.shadow-hover {
    transition: box-shadow 0.3s ease-in-out;
}

.shadow-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Step number styling */
.step-number {
    font-size: 6rem;
    line-height: 1;
    font-weight: 700;
    color: #f3f4f6;
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
}

/* Step content hover effect */
.step-content {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

.step-content:hover {
    transform: translateY(-5px);
}

/* Video thumbnail animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.play-button-ring {
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .step-number {
        font-size: 4rem;
        top: -1.5rem;
    }
}

/* app/assets/stylesheets/components/_client_section.css */

.feature-grid-card {
    height: calc(50% - 0.5rem); /* Adjusts for gap */
    min-height: 180px; /* Minimum height for cards */
    display: flex;
    flex-direction: column;
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.feature-card-hover {
    transition: all 0.3s ease-in-out;
}

.feature-card-hover:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Icon container */
.icon-container {
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transition: all 0.3s ease-in-out;
}

.feature-card-hover:hover .icon-container {
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0.3));
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .feature-grid-card {
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .feature-grid-card {
        min-height: auto;
    }
}

/* app/assets/stylesheets/components/_transporter_section.css */

.transporter-card {
    height: 100%;
    min-height: 180px;
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.05)
    );
    transition: all 0.3s ease-in-out;
}

.transporter-card:hover {
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.1)
    );
    transform: translateY(-4px);
}

.transporter-icon {
    background: linear-gradient(
            45deg,
            rgba(140, 168, 63, 0.3),
            rgba(140, 168, 63, 0.4)
    );
}

.transporter-card:hover .transporter-icon {
    background: linear-gradient(
            45deg,
            rgba(140, 168, 63, 0.4),
            rgba(140, 168, 63, 0.5)
    );
}

/* Text truncation */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .transporter-card {
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .transporter-card {
        min-height: auto;
    }
}

/* RTL Support */
[dir="rtl"] .transporter-card {
    text-align: right;
}

/* Animation variants */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
}

@font-face {
    font-family: 'Emirates';
    src: url(/assets/NotoKufiArabic-Regular-e3360af340552b4c2473c02176fffd32a4a62f32c64feb6f7a93b9195740d62b.ttf) format('tff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Emirates';
    src: url(/assets/NotoKufiArabic-Bold-50afcd9b9c1d735f71cfed83ed9b55e45654350a0470c231a4872cbc1e01e3c6.ttf) format('tff');
    font-weight: bold;
    font-style: normal;
}

.text-right {
    font-family: 'Emirates', sans-serif;
}

@media (min-width: 1024px) {
    .sticky {
        position: sticky;
        top: 2rem;
        height: calc(100vh - 12rem);
        overflow-y: auto;
    }
}

/* Mobile-specific media queries */
@media screen and (max-width: 428px) { /* iPhone 12 Pro Max width */
    .hero-section {
        min-height: calc(var(--vh, 1vh) * 100);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .container {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Fix app store buttons on mobile */
    .app-store-buttons {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .app-store-buttons img {
        height: 40px;
        width: auto;
    }
}

/* Add responsive text adjustments */
@media screen and (max-width: 375px) {
    h1, .h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
}

/* Mobile Menu Styles */
.mobile-menu {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    background-color: white;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Handle safe areas for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .mobile-menu {
        padding-top: calc(4rem + env(safe-area-inset-top));
    }
}

/* Ensure menu is above other content */
.z-50 {
    z-index: 50;
}

/* Animation classes */
.translate-x-0 {
    transform: translateX(0);
}

.translate-x-full {
    transform: translateX(100%);
}

.transition-transform {
    transition-property: transform;
}

.duration-300 {
    transition-duration: 300ms;
}

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (max-width: 768px) {
    .app-store-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .app-store-buttons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    .app-store-buttons img {
        height: 48px;
        width: auto;
    }
}

/* Add these styles to your landing.css file */

/* WhatsApp float button animations */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

#whatsapp-float a {
    animation: pulse-whatsapp 2s infinite;
}

#whatsapp-float a:hover {
    animation: none;
}

/* Higher z-index to ensure the button appears above other elements */
#whatsapp-float {
    z-index: 9999;
}

/* Media query for mobile adjustments */
@media (max-width: 640px) {
    #whatsapp-float {
        bottom: 20px;
        left: 20px;
    }

    #whatsapp-float a {
        width: 50px;
        height: 50px;
    }

    #whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

/* RTL support */
[dir="rtl"] #whatsapp-float span {
    left: auto;
    right: 4rem;
}
