/* === Base Styles === */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

/* === Layout Direction === */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* === Mobile Menu === */
#mobile-menu {
    display: none;
    transition: opacity 0.3s ease;
}

#mobile-menu.active {
    display: block;
}

#mobile-menu.hidden {
    display: none !important;
}

#mobile-menu:not(.hidden) {
    display: block !important;
}

#mobile-menu-button {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    z-index: 51;
    position: relative;
}

/* === Navbar === */
nav {
    z-index: 50;
}

[include-html="components/navbar.html"] {
    min-height: 80px;
    position: relative;
    width: 100%;
}

#navbar-placeholder {
    display: block;
}

body.navbar-loaded #navbar-placeholder {
    display: none;
}

/* === Crystal Flame Logo Animation === */
.crystal-flame {
    position: relative;
    width: 100px;
    height: 120px;
    margin: 0 auto;
}

.crystal {
    position: absolute;
    background: linear-gradient(135deg, #FF3232, #FF6B6B);
    clip-path: polygon(50% 0%, 100% 30%, 82% 90%, 18% 90%, 0% 30%);
    transition: all 0.5s ease;
    animation: crystal-pulse 3s infinite alternate;
}

.crystal-1 {
    width: 50px;
    height: 80px;
    top: 10px;
    left: 25px;
    z-index: 3;
    animation-delay: 0s;
}

.crystal-2 {
    width: 40px;
    height: 60px;
    top: 30px;
    left: 10px;
    transform: rotate(-15deg);
    z-index: 2;
    animation-delay: 0.5s;
}

.crystal-3 {
    width: 40px;
    height: 60px;
    top: 30px;
    right: 10px;
    transform: rotate(15deg);
    z-index: 2;
    animation-delay: 1s;
}

.animate-flame:hover .crystal-1 {
    transform: translateY(-8px) scale(1.05);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 50, 50, 0.8));
}

.animate-flame:hover .crystal-2 {
    transform: translateY(-5px) rotate(-15deg) scale(1.03);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 50, 50, 0.8));
}

.animate-flame:hover .crystal-3 {
    transform: translateY(-5px) rotate(15deg) scale(1.03);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 50, 50, 0.8));
}

/* === Toggle Switch === */
.toggle-checkbox:checked {
    right: 0;
    border-color: #FF3232;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #FF3232;
}

/* === Page Header === */
.page-header {
    position: relative;
    background-color: #001F3F;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23FF3232" fill-opacity="0.1" d="M0,128L48,117.3C96,107,192,85,288,96C384,107,480,149,576,154.7C672,160,768,128,864,112C960,96,1056,96,1152,112C1248,128,1344,160,1392,176L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: 100%;
    opacity: 0.8;
}

/* === Video Background === */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 31, 63, 0.7), rgba(0, 31, 63, 0.8));
}

/* Hero content positioning */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    z-index: 10;
}

/* === Card Styles === */
/* Solution cards hover effect */
.solution-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.solution-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.solution-card::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 5%;
    width: 90%;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.solution-card:hover::after {
    opacity: 1;
}

/* Contact card hover effect */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Team cards */
.team-card {
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-card .social-links {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.team-card:hover .social-links {
    opacity: 1;
    transform: translateY(0);
}

/* Product cards */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card .image-container {
    overflow: hidden;
    position: relative;
}

.product-card .image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .image-container::after {
    opacity: 1;
}

.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Ensure button remains clickable */
.view-details {
    position: relative;
    z-index: 5;
}

/* === Image Gallery === */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-main {
    grid-column: span 4;
    margin-bottom: 8px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.gallery-thumb {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.gallery-thumb.active {
    border-color: #FF3232;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.slider-nav {
    cursor: pointer;
    z-index: 10;
}

/* === Sliders === */
/* Hero Slider Styles */
.hero-slider .swiper-slide {
    background-position: center;
    background-size: cover;
}

.hero-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.hero-slider .swiper-pagination-bullet-active {
    background: #FF3232;
}

/* Services image slider */
.service-slider {
    height: 300px;
}

.service-slider .swiper-slide {
    background-position: center;
    background-size: cover;
}

/* Related products slider */
.related-slider {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
}

.related-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.related-slider-container {
    display: inline-flex;
    padding: 1rem;
}

/* Waste disposal slider */
.waste-disposal-slider {
    height: 400px;
    width: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
}

.waste-disposal-slider .swiper-slide {
    width: 100%;
    height: 100%;
}

.waste-disposal-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Navigation arrows */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    background-position: center;
    background-size: 50% auto;
    background-repeat: no-repeat;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
}

/* Navigation arrow buttons */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
}

.nav-arrow:hover {
    background-color: #f5f5f5;
}

.nav-arrow.prev {
    left: 10px;
}

.nav-arrow.next {
    right: 10px;
}

/* === Dropdown Menu === */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    border-radius: 0 0 0.5rem 0.5rem;
}

.has-mega-menu:hover .mega-menu {
    display: block;
}

/* === Accordion === */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
    max-height: 2000px; /* Large enough to contain content */
}

.accordion-header {
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion.active .accordion-header {
    background-color: #FF3232;
    color: white;
}

/* === Tables === */
.features-table th {
    background-color: #FF3232;
    color: white;
}

.features-table tr:nth-child(even) {
    background-color: rgba(229, 231, 235, 0.5);
}

/* === Progress Bar === */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #FF3232;
    border-radius: 4px;
    transition: width 1.5s ease-in-out;
}

/* === Maps Container === */
.maps-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.maps-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* === CAPTCHA Styles === */
.captcha-container {
    position: relative;
    background: #f0f5ff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.captcha-text {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    user-select: none;
}

.captcha-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.1);
}

.captcha-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.captcha-refresh-btn {
    background-color: #FF3232;
    color: white;
    font-size: 1.25rem;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-refresh-btn:hover {
    background-color: #FF6B6B;
    transform: rotate(180deg);
}

/* === Footer === */
footer {
    background-color: #161616;
}

footer a {
    display: inline-block;
}

footer a:hover {
    transform: translateX(5px);
}

/* === Loaders === */
.loader {
    border-top-color: #FF3232;
    animation: spinner 1.5s linear infinite;
}

/* === Oil Drop Animation === */
.oil-drop {
    perspective: 600px;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.oil-drop-top {
    position: absolute;
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #FF3232 0%, #FF6B6B 100%);
    border-radius: 50% 50% 0 0;
    transform-origin: bottom;
    transform: rotateX(-20deg);
    animation: pulse 4s infinite alternate;
}

.oil-drop-bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #BB0000 0%, #FF3232 100%);
    border-radius: 0 0 50% 50%;
    transform-origin: top;
    transform: rotateX(20deg);
    animation: pulse 4s infinite alternate-reverse;
}

.oil-drop::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 20%;
    height: 20%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(4px);
    animation: shine 6s infinite;
}

/* === Feature Widget === */
.feature-widget {
    animation: slideInFromBottom 1s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

/* === Buttons === */
.download-btn {
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* === Utilities === */
.active-page {
    font-weight: bold;
    color: #FF3232;
}

.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

/* === Dark Mode === */
.dark .crystal {
    background: linear-gradient(135deg, #FF3232, #FF0000);
}

.dark .overlay {
    background: linear-gradient(rgba(10, 15, 30, 0.8), rgba(10, 15, 30, 0.9));
}

.dark .captcha-container {
    background: #1f2937;
}

.dark .mega-menu {
    background-color: #0F172A;
}

.dark .features-table tr:nth-child(even) {
    background-color: rgba(31, 41, 55, 0.5);
}

.dark .nav-arrow {
    background-color: #374151;
    color: white;
}

.dark .nav-arrow:hover {
    background-color: #4B5563;
}

.dark footer {
    background-color: #0A0A0A;
}

.dark .text-primary {
    color: #fff;
}

.dark .text-gray-700 {
    color: #e5e7eb;
}

.dark .text-gray-600 {
    color: #d1d5db;
}

.dark .bg-white {
    background-color: #1f2937;
}

.dark .bg-background-light {
    background-color: #111827;
}

/* === RTL Support === */
.rtl .ml-1 {
    margin-left: 0;
    margin-right: 0.25rem;
}

.rtl .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

.rtl .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

.rtl .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

.rtl .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

.rtl .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

.rtl .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

.rtl .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .space-x-6 > * + * {
    margin-left: 0;
    margin-right: 1.5rem;
}

.rtl .group .absolute.left-0 {
    left: auto;
    right: 0;
}

.rtl .group-hover\:rotate-180 {
    transform: rotate(180deg);
}

.rtl .swiper-button-next {
    right: auto;
    left: 10px;
}

.rtl .swiper-button-prev {
    left: auto;
    right: 10px;
}

.rtl .shadow-lg {
    --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rtl footer a:hover {
    transform: translateX(-5px);
}

/* === Animations === */
@keyframes crystal-pulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 50, 50, 0.5));
    }
    100% {
        filter: brightness(1);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes pulse {
    0% { opacity: 0.8; filter: brightness(1); }
    100% { opacity: 1; filter: brightness(1.2); }
}

@keyframes shine {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
    100% { opacity: 0.4; transform: scale(1); }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Media Queries === */
@media (max-width: 1280px) {
    .feature-widget {
        width: 280px;
        right: 2rem;
    }
}

@media (max-width: 1024px) {
    .feature-widget {
        width: 250px;
        right: 1.5rem;
        bottom: 4rem;
        left: 1rem;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .feature-widget {
        display: none;
    }
    
    footer .grid {
        gap: 2rem;
    }
    
    #mobile-menu-button {
        display: block !important;
    }
}

