/**
 * Custom CSS for VEDA Air Cooling Solutions Static Site
 */

/* Fallback styles in case Tailwind doesn't load */
body { 
    margin: 0; 
    padding: 0; 
    font-family: system-ui, -apple-system, sans-serif; 
    background: white;
    color: #1f2937;
}

.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

/* Ensure content is visible even if Tailwind doesn't load */
nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    background: rgba(255,255,255,0.95); 
    z-index: 50; 
    height: 80px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
}

nav > div {
    width: 100%;
}

nav .container { 
    display: flex; 
    align-items: center; 
    height: 100%;
}

/* Mobile menu button visibility */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

nav .container > div:first-child {
    flex-shrink: 0;
}

nav .container > div:last-child {
    flex-shrink: 0;
}

nav img { 
    width: 200px; 
    height: auto; 
    object-fit: contain;
}

nav a { 
    text-decoration: none; 
    display: inline-block;
}

section { 
    padding: 5rem 0; 
    min-height: 50vh; 
}

h1, h2, h3 { 
    margin: 1rem 0; 
}

p { 
    margin: 0.5rem 0; 
    line-height: 1.6; 
}

/* CSS Variables for Design System */
:root {
    --background: 0 0% 100%;
    --foreground: 218 45% 15%;
    --primary: 218 58% 20%;
    --primary-foreground: 0 0% 100%;
    --secondary: 204 65% 65%;
    --secondary-foreground: 0 0% 100%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    --accent: 189 75% 45%;
    --accent-foreground: 0 0% 100%;
    --border: 214 32% 91%;
    --radius: 0.5rem;
}

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

/* Fade In Animation */
@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

/* Mobile Menu Styles */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 40;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Products Dropdown Styles */
.products-dropdown {
    position: relative;
}

.products-dropdown:hover .products-dropdown > div {
    display: block;
}

/* Mobile Products Submenu */
.products-mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.products-mobile-submenu.active {
    max-height: 500px;
    display: block !important;
}

.products-mobile-submenu.hidden.active {
    display: block !important;
}

.products-mobile-icon.active {
    transform: rotate(180deg);
}

.mobile-menu.active,
.mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
    overflow: visible;
    display: block;
}

.mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: none;
}

.mobile-menu a {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.menu-icon.hidden {
    display: none;
}

.close-icon:not(.hidden) {
    display: block;
}

.close-icon.hidden {
    display: none;
}

/* Form Styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Container adjustments */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Header/Navigation Styles */
nav {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

nav img {
    max-height: 60px;
    object-fit: contain;
}

/* Ensure mobile menu button is visible */
.mobile-menu-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

.menu-icon {
    display: block !important;
}

.menu-icon.hidden {
    display: none !important;
}

.close-icon {
    display: none !important;
}

.close-icon:not(.hidden) {
    display: block !important;
}

/* FAQ Accordion Styles */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-answer.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-answer:not(.hidden) {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Clients Slider */
.logo-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 100px;
}

.logo-track {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3rem;
    width: max-content !important;
    will-change: transform;
    flex-wrap: nowrap !important;
}

.logo-item {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.2);
    min-width: 180px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-item img {
    height: 48px;
    width: auto;
    max-width: 100%;
    opacity: 1 !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-item img:hover {
    opacity: 1 !important;
    transform: scale(1.05);
}

/* Clients Navigation Arrows */
#clients-prev,
#clients-next {
    display: none;
}

@media (min-width: 768px) {
    #clients-prev,
    #clients-next {
        display: block;
    }
}

/* WhatsApp Button */
a[href*="wa.me"] {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a[href*="wa.me"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.4);
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Installations Gallery Carousel Styles */
.installations-carousel-container {
    position: relative;
    max-width: 100%;
}

.installations-track {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: max-content !important;
    flex-wrap: nowrap !important;
}

.installations-item {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: #f3f4f6;
    aspect-ratio: 4/3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 210px;
}

@media (min-width: 640px) {
    .installations-item {
        width: 300px;
        min-width: 300px;
        max-width: 300px;
        height: 225px;
    }
}

@media (min-width: 1024px) {
    .installations-item {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
        height: 240px;
    }
}

@media (min-width: 1280px) {
    .installations-item {
        width: 350px;
        min-width: 350px;
        max-width: 350px;
        height: 262px;
    }
}

.installations-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.installations-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.installations-item:hover img {
    transform: scale(1.1);
}

.installations-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.installations-item:hover::after {
    opacity: 1;
}

.installations-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.installations-item:hover .installations-item-overlay {
    transform: translateY(0);
}

.installations-item-overlay h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.installations-item-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Dots Indicator */
.installations-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.installations-dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.installations-dot.active {
    background: #1e40af;
    width: 32px;
    border-radius: 5px;
}

/* Lightbox Modal Styles */
.lightbox-modal {
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.lightbox-modal.show {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    animation: zoomIn 0.3s ease-out;
}

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

#lightbox-image {
    animation: fadeInImage 0.3s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .gallery-item {
        aspect-ratio: 4/3;
    }
    
    .gallery-item:nth-child(n) {
        aspect-ratio: 4/3;
    }
    
    .lightbox-modal {
        padding: 1rem;
    }
    
    #lightbox-prev,
    #lightbox-next {
        padding: 0.5rem;
    }
}

/* Tagline Badge Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float-badge {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.tagline-badge {
    background: linear-gradient(90deg, #fbbf24 0%, #fcd34d 25%, #fde047 50%, #fcd34d 75%, #fbbf24 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite, float-badge 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .tagline-badge {
        display: flex;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.tagline-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.tagline-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

