@tailwind base;
@tailwind components;
@tailwind utilities;

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
    }
    
    .max-w-7xl {
        max-width: 1400px !important;
    }
    
    .max-w-6xl {
        max-width: 1300px !important;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1600px;
    }
    
    .max-w-7xl {
        max-width: 1600px !important;
    }
    
    .max-w-6xl {
        max-width: 1500px !important;
    }
}

main {
    width: 100%;
    max-width: 100%;
}

.service-card {
    will-change: transform;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.transform-hover:hover {
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.hero {
    background-size: cover;
    background-position: center;
}

/* ========== Hero section (home) ========== */
.hero-home {
    background: linear-gradient(160deg, #eff6ff 0%, #f8fafc 35%, #ffffff 100%);
    padding-bottom: 3.5rem;
}
@media (min-width: 1024px) {
    .hero-home {
        padding-bottom: 4.5rem;
    }
}
.hero-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.08) 1px, transparent 0);
    background-size: 28px 28px;
    pointer-events: none;
}
.hero-home::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(147, 197, 253, 0.15) 0%, transparent 65%);
    pointer-events: none;
}

.hero-home .hero-badge {
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-home .hero-badge:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.hero-home .hero-heading {
    letter-spacing: -0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hero-home .hero-stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}
.hero-home .hero-stat-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.hero-home .hero-cta-primary {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-home .hero-cta-primary:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}
.hero-home .hero-cta-primary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.hero-home .hero-cta-secondary {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-home .hero-cta-secondary:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}
.hero-home .hero-cta-secondary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.hero-home .hero-image-wrap {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.04));
}
.hero-home .hero-image-card {
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.hero-home .hero-image-card:hover {
    box-shadow: 0 32px 64px -12px rgba(37, 99, 235, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}
.hero-home .hero-image-bg {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 1.5rem;
}

.hero-home .hero-badge-tag {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-home .hero-badge-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

button {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* .fixed-header — full styles in includes/header.php (glass, scrolled) */

body {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    main {
        padding-top: 0 !important;
    }
    
    main > section:first-child {
        margin-top: 0 !important;
        padding-top: 80px !important; 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#callSpecialist {
    animation: pulse 2s infinite;
}

.pricing-content {
    animation: fadeIn 0.5s ease-in-out;
    will-change: opacity, transform;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-left {
    animation: fade-in-left 1s ease-out;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.notification-overlay {
    backdrop-filter: blur(4px);
}

/* ========== Modern page styles (same approach as header) ========== */

/* Page hero — gradient overlay, glass content area */
.page-hero {
    position: relative;
    overflow: hidden;
}
.page-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.45) 50%, rgba(15,23,42,0.5) 100%);
    z-index: 10;
}
.page-hero .hero-content {
    position: relative;
    z-index: 20;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.page-hero .hero-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-hero .hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Section title — accent line (centered when parent is text-center) */
.section-title {
    position: relative;
    padding-bottom: 0.75rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}
.section-title.text-left::after { left: 0; transform: none; }

/* Cards — soft shadow, border, hover lift */
.card-modern {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 24px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

/* Primary button (site-wide CTA) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}
.btn-primary:focus {
    outline: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), 0 0 0 3px rgba(37, 99, 235, 0.3);
}
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), 0 0 0 3px rgba(37, 99, 235, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

/* Secondary / outline button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #2563eb;
    background: transparent;
    border: 2px solid #2563eb;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.btn-secondary:hover {
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}
.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.btn-secondary:active {
    transform: translateY(0);
}

/* Green CTA (e.g. calculator) */
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #fff;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}
.btn-success:focus-visible {
    outline: none;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35), 0 0 0 3px rgba(5, 150, 105, 0.35);
}
.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}

/* CTA banner strip (index, etc.) */
.cta-banner {
    border-radius: 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    box-shadow: 0 8px 32px rgba(29, 78, 216, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form inputs — modern rounded, focus ring */
.input-modern,
input.input-modern,
select.input-modern,
textarea.input-modern {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-modern:focus,
input.input-modern:focus,
select.input-modern:focus,
textarea.input-modern:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.input-modern:focus-visible,
input.input-modern:focus-visible,
select.input-modern:focus-visible,
textarea.input-modern:focus-visible {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Form card container */
.form-card {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Breadcrumbs — subtle glass bar */
.breadcrumb-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.breadcrumb-bar a {
    transition: color 0.2s ease;
}
.breadcrumb-bar a:hover {
    color: #1d4ed8;
}

/* Stat / counter blocks */
.stat-card {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Prose / reading width — для текстовых блоков и статей */
.prose-width {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}
.prose-width-wide {
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

/* Скрыть кнопку «Калькулятор стоимости» на мобильных */
@media (max-width: 767px) {
    .calculator-btn {
        display: none !important;
    }
}