/* Additional Custom Styles for مبادرة ماسة صحار */
/* Mobile-First Responsive Design */

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
}

.rtl {
    direction: rtl;
}

/* Mobile-optimized container */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #6c4bb8;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a3d9a;
}

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Slide In Bottom Animation */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-90deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(108, 75, 184, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(108, 75, 184, 0.6);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ============================================
   HERO VIDEO SECTION
   ============================================ */

.hero-video-section {
    position: relative;
    height: 100vh; /* Full viewport height on mobile */
    min-height: 500px;
    max-height: 700px;
    overflow: hidden;
    background: linear-gradient(135deg, #6c4bb8 0%, #9b7ed8 50%, #6c4bb8 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

@media (min-width: 768px) {
    .hero-video-section {
        height: 600px;
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1;
    object-fit: cover;
    opacity: 0.9;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 75, 184, 0.7) 0%, rgba(155, 126, 216, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
}

/* ============================================
   ENHANCED CARD STYLES
   ============================================ */

.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 75, 184, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-hover:active {
    transform: translateY(-5px) scale(1.01);
}

/* ============================================
   LOGO STYLES
   ============================================ */

.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(108, 75, 184, 0.3));
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   GRADIENT TEXT
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, #6c4bb8 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(108, 75, 184, 0.2);
    border-top-color: #6c4bb8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* Base Mobile Styles (Default) */
body {
    font-size: 14px;
}

h1 {
    font-size: 1.75rem !important;
    line-height: 1.3;
}

h2 {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.25rem !important;
}

p {
    font-size: 0.95rem;
}

/* Hero Section - Mobile Optimized */
.hero-video-section {
    height: 100vh;
    min-height: 500px;
    max-height: 650px;
}

.hero-content h1 {
    font-size: 2rem !important;
    padding: 0 1rem;
}

.hero-content p {
    font-size: 1rem !important;
    padding: 0 1rem;
}

.hero-content a {
    font-size: 0.95rem !important;
    padding: 0.75rem 1.5rem !important;
}

/* Logo container - size controlled by inline styles in HTML */

/* Cards - Mobile Stack */
.grid {
    gap: 1rem !important;
}

.card {
    padding: 1.25rem !important;
}

.card h3 {
    font-size: 1.15rem !important;
}

.card p {
    font-size: 0.9rem !important;
}

/* Buttons - Touch Friendly */
button,
.btn,
a.inline-block {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Forms - Mobile Optimized */
input,
textarea,
select {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 0.75rem !important;
    width: 100%;
}

textarea {
    min-height: 120px;
}

/* Tables - Responsive */
table {
    font-size: 0.85rem;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Navbar - Mobile */
nav {
    padding: 0.75rem 1rem;
}

.mobile-menu {
    width: 100% !important;
}

/* Footer - Mobile */
footer {
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

/* Spacing - Mobile */
.py-16 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.my-16 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

/* ============================================
   TABLET STYLES (768px and up)
   ============================================ */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    .hero-video-section {
        height: 600px;
    }

    .hero-content h1 {
        font-size: 3rem !important;
    }

    .hero-content p {
        font-size: 1.25rem !important;
    }

    /* Logo size controlled by inline styles */

    .grid {
        gap: 2rem !important;
    }

    .card {
        padding: 2rem !important;
    }

    footer {
        padding: 3rem 1.5rem;
    }

    .py-16 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* ============================================
   DESKTOP STYLES (1024px and up)
   ============================================ */
@media (min-width: 1024px) {
    h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.5rem !important;
    }

    .hero-content h1 {
        font-size: 3.5rem !important;
    }

    .hero-content p {
        font-size: 1.5rem !important;
    }

    /* Logo size controlled by inline styles */

    .py-16 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* ============================================
   TOUCH OPTIMIZATIONS
   ============================================ */

/* Larger touch targets */
a, button, input[type="submit"], input[type="button"] {
    -webkit-tap-highlight-color: rgba(108, 75, 184, 0.3);
    touch-action: manipulation;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on UI elements */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Fix for iOS input zoom */
@media screen and (max-width: 767px) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
        font-size: 16px !important;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-video-section {
        height: 100vh;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 1.75rem !important;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    .logo-container {
        margin-bottom: 0.5rem !important;
    }

    /* Logo size controlled by inline styles */
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header, footer, .no-print, .hero-video-section {
        display: none;
    }
}
