/* Custom CSS for Al Bajiri Heavy Equipment Rental */

/* Font Face Definition */
@font-face {
    font-family: 'DINNextLTArabic';
    src: url('../fonts/DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Font fallback for bold weights using the same font */
@font-face {
    font-family: 'DINNextLTArabic';
    src: url('../fonts/DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DINNextLTArabic';
    src: url('../fonts/DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DINNextLTArabic';
    src: url('../fonts/DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Apply Arabic font to all elements */
* {
    font-family: 'DINNextLTArabic', 'Cairo', Arial, sans-serif;
}

/* Ensure font is applied to specific elements */
body, html, h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, label {
    font-family: 'DINNextLTArabic', 'Cairo', Arial, sans-serif !important;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes moveStrip {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes moveStripReverse {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes moveStripSeamless {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Custom styles */
.hero-pattern {
    background-image: 
        linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%),
        url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f59e0b" fill-opacity="0.1"><polygon points="36 34 24 34 24 26 36 26"/></g></g></svg>');
}

.gradient-text {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.equipment-card {
    position: relative;
    overflow: hidden;
}

.equipment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equipment-card:hover::before {
    opacity: 1;
}

.equipment-card .content {
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.equipment-card:hover .content {
    color: white;
}

/* Navigation hover effects */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

/* Parallax sections */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.parallax-content {
    position: relative;
    z-index: 10;
}

/* Stats counter animation */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: #f59e0b;
}

/* Gallery grid */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    height: 400px; /* Fixed height for consistency */
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
    filter: brightness(1.0) contrast(1.1);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.2);
}

/* Special handling for portrait images */
.gallery-item img[src*="IMG-11"] {
    object-fit: cover;
    object-position: center top;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(245, 158, 11, 0.85), 
        rgba(217, 119, 6, 0.85),
        rgba(180, 83, 9, 0.85)
    );
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay .text-center {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay .text-center {
    transform: translateY(0);
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 15px 0;
    }
    
    .gallery-item {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px 0;
    }
    
    .gallery-item {
        height: 300px;
    }
}

/* Contact form */
.form-input {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    outline: none;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Equipment icons */
.equipment-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.equipment-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Map container */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    border-radius: 12px;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%);
}

/* Location cards */
.location-card {
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #f59e0b;
}

.location-card .p-6 {
    flex-grow: 1;
}

/* Enhanced button styles for location cards */
.location-card .bg-gradient-to-r {
    transition: all 0.3s ease;
}

.location-card .bg-gradient-to-r:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 4rem;
    color: #f59e0b;
    font-weight: bold;
    line-height: 1;
}

/* Service features */
.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Overlay patterns */
.pattern-overlay {
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(245, 158, 11, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Hero video overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(245, 158, 11, 0.3));
}

/* Success message */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    margin: 16px 0;
    animation: fadeInUp 0.5s ease;
}

/* Error message */
.error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    margin: 16px 0;
    animation: fadeInUp 0.5s ease;
}

/* Moving Background Strip */
.moving-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
    overflow: hidden;
    z-index: 0;
}

/* Diagonal Moving Strip */
.moving-strip-diagonal {
    position: absolute;
    left: 0%;
    width: 100%;
    display: flex;
    overflow: hidden;
    z-index: 0;
    transform-origin: center;
}

.strip-images {
    display: flex;
    width: 100%;
    height: 100%;
    animation: moveStripSeamless 80s linear infinite;
    gap: 30px;
    align-items: center;
    padding: 0 15px;
    flex-wrap: nowrap;
}

.strip-images-reverse {
    animation: moveStripReverse 90s linear infinite;
}

.strip-image {
    width: 220px;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    filter: blur(0.3px) brightness(0.9);
    opacity: 0.7;
    transition: all 0.5s ease;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Button improvements */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* Scroll indicator improvements */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.scroll-indicator i {
    display: block;
    font-size: 1.5rem;
}

/* Service Card Icon Text */
.service-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-icon-text {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}
.error-message {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    margin: 16px 0;
    animation: fadeInUp 0.5s ease;
}
