/* Custom styles for the elevator equipment website */

/* CSS Custom Properties */
:root {
    --vh: 1vh;
    --primary-color: #F07A2B;
    --primary-hover: #e06f24;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #F6F8FB;
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
}

/* Mobile viewport height fix */
.min-h-screen {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

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

/* Hero section background fallback */
.hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Form animations */
.form-container {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

section .container{
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Card hovers to match subtle elevation */
.service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* Button hover effects */
.btn-primary {
    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.5s;
}

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

/* Advantages row spacing */
.advantage-item { transition: transform 0.2s ease; }
.advantage-item:hover { transform: translateY(-2px); }

/* Logo hover effects */
.client-logo {
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* News card animations */
.news-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,0,0,0.08); }

/* Logo tiles */
.logo-tile { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.logo-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,0.08); }

/* Form focus states and input styling */
input, textarea {
    color: #000000 !important;
}

input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

/* Loading animation for form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Desktop-First Responsive Design */

/* Container */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}

/* Basic responsive images */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Form elements */
button, input, textarea, select {
    font-size: 16px; /* Prevents iOS zoom on mobile */
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 32px !important;
        line-height: 1.2;
    }

    .form-container {
        padding: 16px !important;
    }

    .py-20 {
        padding: 32px 0 !important;
    }

    .py-16 {
        padding: 24px 0 !important;
    }

    .py-10 {
        padding: 16px 0 !important;
    }
}

/* MOBILE RESPONSIVE OVERRIDES */
@media (max-width: 767px) {
    .service-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .news-header {
        flex-direction: column !important;
        text-align: center;
    }

    .news-buttons {
        flex-direction: column !important;
        width: 100%;
    }

    .expert-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .cta-content {
        flex-direction: column !important;
        text-align: center;
    }

    .cta-agent {
        flex-direction: column !important;
    }

    .cta-actions {
        flex-direction: column !important;
        width: 100%;
    }

    .catalog-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    footer{
        padding: 16px !important;
    }

    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    footer .border-t .flex {
        flex-direction: column !important;
        text-align: center;
    }
}

/* DESKTOP DEFAULT STYLES */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.expert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.news-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.news-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: auto;
}

.cta-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.cta-agent {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.cta-actions {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: auto;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

footer .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

footer .border-t .flex {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
}

/* TABLET: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 768px;
        padding: 0 24px;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    footer .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    footer .container {
        padding: 24px !important;
    }
}

/* LARGE DESKTOP: 1280px+ */
@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
        padding: 0 48px;
    }
}

/* DESKTOP STYLES (1024px+) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 0 32px;
    }
}

/* EXTRA LARGE DESKTOP: 1536px+ */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
        padding: 0 48px;
    }
}

/* Mobile Navigation and Header */
.mobile-menu-button {
    display: none;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #F07A2B;
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #1f2937;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 1023px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
}

@media (min-width: 1024px) {
    .mobile-menu-button {
        display: none !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .mobile-menu.active {
        display: none !important;
    }
}

/* Touch-friendly interactions */
@media (max-width: 1023px) {
    button, .btn, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .service-card,
    .news-card,
    .logo-tile {
        transition: none;
    }
    
    .service-card:hover,
    .news-card:hover,
    .logo-tile:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    /* Remove hover effects on touch devices */
    .advantage-item:hover,
    .client-logo:hover {
        transform: none;
        filter: inherit;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .ticker-track {
        animation: none !important;
    }
    
    .testimonial-track {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card,
    .news-card,
    .logo-tile {
        border: 2px solid currentColor;
    }
    
    .advantage-item {
        border: 1px solid currentColor;
    }
}

/* Print styles */
@media print {
    .ticker,
    .testimonial-slider,
    .cta-actions,
    button {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .form-container {
        display: none !important;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #fb923c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Fade in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Horizontal ticker (auto-scroll) */
.ticker {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.ticker-track {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    will-change: transform;
    padding: 6px 0;
}

.ticker-item { flex: 0 0 auto; }

/* Testimonials slider */
.testimonial-track {
    display: flex;
    transition: transform 400ms ease;
}

.testimonial-slide {
    min-width: 100%;
}


