/* Custom animations and styles for betonnyy-pol.ru */

/* Custom Select Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23990000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px !important;
    cursor: pointer;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23990000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E");
}

/* Select hover state */
select:hover {
    border-color: #990000 !important;
}

/* Select options styling */
select option {
    padding: 12px 16px;
    background: white;
    color: #1C1C1C;
    font-size: 14px;
}

select option:checked {
    background: #990000;
    color: white;
}

select option:hover {
    background: #f3f4f6;
}

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

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7a0000;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #990000;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #990000;
    color: white;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Animation delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Custom animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-ring {
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #990000 0%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Image loading placeholder */
.img-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* Mobile bottom bar safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-safe {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Prevent layout shift from fonts */
body {
    font-display: swap;
}

/* Image responsive defaults */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Form input autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Placeholder styling */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Disable text selection on interactive elements */
button,
a.btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Hero section specific styles */
.hero-gradient {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* Map marker pulse */
.map-marker::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Review card quote */
.review-quote::before {
    content: '"';
    font-size: 4rem;
    line-height: 1;
    color: rgba(153, 0, 0, 0.2);
    position: absolute;
    top: 0;
    left: 0;
}

/* Price tag hot indicator */
.price-hot::after {
    content: 'ХИТ';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #990000;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Step number styling */
.step-number {
    position: relative;
    z-index: 1;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100vw;
    height: 2px;
    background: linear-gradient(90deg, #990000 0%, transparent 100%);
    z-index: -1;
}

/* Gallery image overlay */
.gallery-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

/* FAQ accordion animation */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.open {
    max-height: 500px;
}

/* Form success animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-animate {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease-in-out forwards;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #990000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Fade in animation for dropdowns */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

/* --- СВЕТЛЫЕ АЛЬТЕРНАТИВЫ ФОНА --- */

/* Вариант 1: Легкий чистый градиент (добавляет мягкого объема) */
.bg-light-gradient {
    background: radial-gradient(circle at top center, #ffffff 0%, #f3f4f6 100%);
    background-attachment: fixed;
}

/* Заметный паттерн серого бетона */
.bg-concrete-pattern {
    background-color: #9ca3af;
    background-image: url("/assets/concrete-bg.png");
    background-size: 500px;
    background-position: top left;
    background-attachment: fixed;
    background-repeat: repeat;
}


/* Вариант 2: Очень светлая микро-текстура (едва заметный "чистый бетон") */
.bg-light-concrete {
    background-color: #fcfcfc;
    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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Glassmorphism overrides to reveal the concrete background */
main>section.bg-white,
main>div.bg-white {
    background-color: rgba(255, 255, 255, 0.92) !important;
}

main>section.bg-gray-50,
main>div.bg-gray-50 {
    background-color: rgba(249, 250, 251, 0.90) !important;
}

main>section.bg-gray-100,
main>div.bg-gray-100 {
    background-color: rgba(243, 244, 246, 0.88) !important;
}

/* Variant 3...
.bg-light-grid {
    background-color: #fafafa;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 24px 24px;
}