/* Enhanced Professional CSS for Huda Ayoub Legal Consultancy */

:root {
    --primary-color: #725C02;
    --primary-hover: #785213;
    --primary-light: rgba(114, 92, 2, 0.1);
    --primary-gradient: linear-gradient(135deg, #725C02 0%, #785213 100%);
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #6c757d;
    --shadow-light: 0 5px 25px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Button Styles */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    box-shadow: var(--shadow-light);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: var(--primary-gradient) !important;
}

/* Enhanced Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(248, 249, 250, 0.95) !important;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(114, 92, 2, 0.1);
}

.navbar.scrolled {
    background: rgba(248, 249, 250, 0.98) !important;
    box-shadow: var(--shadow-medium);
    transform: translateY(0);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 25px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    right: 50%;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 80%;
    right: 10%;
}

/* Parallax Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(114, 92, 2, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(114, 92, 2, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: var(--primary-gradient);
    opacity: 0.05;
    transform: rotate(15deg);
    animation: slideIn 2s ease-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%) rotate(15deg);
    }
    to {
        transform: translateX(0) rotate(15deg);
    }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    animation: fadeInUp 1s ease 0.2s both;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-section .fs-5 {
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-section .btn {
    animation: fadeInUp 1s ease 0.8s both;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* Enhanced Motto Cards */
.motto-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-slow);
    height: 100%;
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
}

.motto-card.animate {
    transform: translateY(0);
    opacity: 1;
}

.motto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.05;
    transition: left 0.5s ease;
}

.motto-card:hover::before {
    left: 0;
}

.motto-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-top-color: var(--primary-hover);
}

.motto-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    opacity: 0.1;
    border-radius: 0 20px 0 60px;
    transition: var(--transition-smooth);
}

.motto-card:hover::after {
    width: 80px;
    height: 80px;
    opacity: 0.15;
}

/* Morphing About Section */
.about-content {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    transform: translateY(30px);
    opacity: 0;
    transition: var(--transition-slow);
}

.about-content.animate {
    transform: translateY(0);
    opacity: 1;
}

.about-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.05;
    animation: morphing 8s ease-in-out infinite;
}

@keyframes morphing {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        border-radius: 50%;
    }
    25% {
        transform: scale(1.2) rotate(90deg);
        border-radius: 30%;
    }
    50% {
        transform: scale(0.8) rotate(180deg);
        border-radius: 60%;
    }
    75% {
        transform: scale(1.1) rotate(270deg);
        border-radius: 40%;
    }
}

.about-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* Advanced Service Cards */
.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-slow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
}

.service-card.animate {
    transform: translateY(0);
    opacity: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.03;
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--shadow-heavy);
    border-top-color: var(--primary-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: var(--transition-smooth);
    transform: translate(-50%, -50%);
}

.service-card:hover .service-icon::before {
    width: 100%;
    height: 100%;
}

.service-icon i {
    font-size: 2rem;
    color: white;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: var(--shadow-medium);
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
}

.service-card h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.service-card:hover h4 {
    color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Pulsing Documentation Highlight */
.documentation-highlight {
    background: rgba(255, 255, 255, 0.15);
    padding: 3rem;
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.documentation-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.documentation-highlight .display-1 {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Interactive Contact Cards */
.contact-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-slow);
    height: 100%;
    position: relative;
    overflow: hidden;
    transform: translateY(30px);
    opacity: 0;
}

.contact-card.animate {
    transform: translateY(0);
    opacity: 1;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.05;
    transition: var(--transition-slow);
    transform: translate(-50%, -50%);
}

.contact-card:hover::before {
    width: 200%;
    height: 200%;
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.contact-card .display-4 {
    transition: var(--transition-smooth);
}

.contact-card:hover .display-4 {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary-hover);
}

.contact-message {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.contact-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    animation: slideRight 3s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
    position: relative;
}

/* Button Enhancements */
.btn-lg {
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.btn-success {
    background: linear-gradient(135deg, #25d366 0%, #20b858 100%);
    border: none;
    transition: var(--transition-smooth);
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px;
        min-height: 90vh;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .service-card {
        margin-bottom: 2rem;
    }

    .about-content,
    .contact-message,
    .documentation-highlight {
        padding: 2rem;
    }

    .motto-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Intersection Observer Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-slow);
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition-slow);
}

.zoom-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation Delays */
.service-card:nth-child(1) {
    transition-delay: 0.1s;
}

.service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.service-card:nth-child(3) {
    transition-delay: 0.3s;
}

.service-card:nth-child(4) {
    transition-delay: 0.4s;
}

.service-card:nth-child(5) {
    transition-delay: 0.5s;
}

.service-card:nth-child(6) {
    transition-delay: 0.6s;
}

.service-card:nth-child(7) {
    transition-delay: 0.7s;
}

.service-card:nth-child(8) {
    transition-delay: 0.8s;
}

.service-card:nth-child(9) {
    transition-delay: 0.9s;
}

.motto-card:nth-child(1) {
    transition-delay: 0.1s;
}

.motto-card:nth-child(2) {
    transition-delay: 0.3s;
}

.motto-card:nth-child(3) {
    transition-delay: 0.5s;
}

.contact-card:nth-child(1) {
    transition-delay: 0.2s;
}

.contact-card:nth-child(2) {
    transition-delay: 0.4s;
}


/* Floating Buttons Default (LTR) */
.floating-whatsapp-button {
    position: fixed;
    z-index: 9999;
}

.floating-whatsapp-button {
    bottom: 20px;
    left: 30px; /* LTR default */
}

/* Common Icon Styling */
.floating-whatsapp-button .icon {
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 6px 7px 1px 8px;
    color: #25d366;
    font-size: 28px; /* Increase icon size */
}

/* RTL Support */
[dir="rtl"] .floating-whatsapp-button {
    left: auto;
    right: 30px;
}

.footer {
    color: var(--primary-color); /* text color */
    background-color: var(--primary-color); /* text color */
    font-size: 14px;
    position: relative;
    z-index: 2; /* make footer content above waves */
}

.footer-hero-waves {
    display: block;
    width: 100%;
    height: 60px;
    position: relative;
    margin-bottom: 9px; /* slightly overlap footer */
    transform: scaleY(1); /* flip wave if needed */
    z-index: 1;
}

.footer-hero-waves .wave1 use,
.footer-hero-waves .wave2 use,
.footer-hero-waves .wave3 use {
    fill: var(--primary-color); /* text color */
    opacity: 0.6; /* adjust for wave layering */
}

@media (max-width: 768px) {
    .footer-writes {
        padding-bottom: 100px !important;
    }

    .floating-whatsapp-button .icon {
        padding: 6px 7px 4px 8px;
    }
}

.footer-hero-waves .wave1 use {
    animation: move-forever1 10s linear infinite;
    animation-delay: -2s;
    fill: var(--primary-color);
    opacity: 0.6;
}

.footer-hero-waves .wave2 use {
    animation: move-forever2 8s linear infinite;
    animation-delay: -2s;
    fill: var(--primary-color);
    opacity: 0.4;
}

.footer-hero-waves .wave3 use {
    animation: move-forever3 6s linear infinite;
    animation-delay: -2s;
    fill: var(--primary-color);
}


@keyframes move-forever1 {
    0% {
        transform: translate(85px, 0%);
    }

    100% {
        transform: translate(-90px, 0%);
    }
}

@keyframes move-forever2 {
    0% {
        transform: translate(-90px, 0%);
    }

    100% {
        transform: translate(85px, 0%);
    }
}

@keyframes move-forever3 {
    0% {
        transform: translate(-90px, 0%);
    }

    100% {
        transform: translate(85px, 0%);
    }
}

.contact-map {
    width: 100%;
    height: 400px;
}

.text-primary-phone {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.saudi-bar {
    display: block;
    max-height: 90px;
    border-radius: 12px;
}

.logo-header img {
    height: 50px;
    padding-top: 13px
}

.logo-footer img {
    display: block;
    max-height: 60px;
}
