/**
 * NovaCMS Custom Styles
 * Additional styles on top of Tailwind
 */

/* Custom fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Brand colors */
:root {
    --color-primary: #66BB6A;
    --color-primary-dark: #4CAF50;
    --color-secondary: #1f2937;
    --color-accent: #fdd835;
    --color-accent-dark: #f9c500;
}

/* Tailwind custom classes */
.bg-primary { background-color: var(--color-primary) !important; }
.bg-primary-dark { background-color: var(--color-primary-dark) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.bg-accent-dark { background-color: var(--color-accent-dark) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-accent { color: var(--color-accent) !important; }
.border-primary { border-color: var(--color-primary) !important; }
.hover\:bg-primary:hover { background-color: var(--color-primary) !important; }
.hover\:bg-primary-dark:hover { background-color: var(--color-primary-dark) !important; }
.hover\:bg-accent-dark:hover { background-color: var(--color-accent-dark) !important; }
.hover\:text-primary:hover { color: var(--color-primary) !important; }
.bg-primary\/10 { background-color: rgba(26, 127, 55, 0.1) !important; }
.hover\:bg-primary\/10:hover { background-color: rgba(26, 127, 55, 0.1) !important; }
.shadow-primary\/25 { box-shadow: 0 10px 15px -3px rgba(26, 127, 55, 0.25) !important; }
.shadow-primary\/10 { box-shadow: 0 10px 15px -3px rgba(26, 127, 55, 0.1) !important; }
.group-hover\:shadow-primary\/10:hover { box-shadow: 0 10px 15px -3px rgba(26, 127, 55, 0.1) !important; }
.group-hover\:bg-primary:hover { background-color: var(--color-primary) !important; }

/* Footer tag cloud "more" button */
.ft-tag-more {
    background-color: rgba(102, 187, 106, 0.1);
    color: var(--color-primary);
}
.ft-tag-more:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: 1280px;
}

/* Hero gradient overlay */
.hero-gradient {
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

/* Button hover effects */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 127, 55, 0.4);
}

/* Card hover effects */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Input focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 127, 55, 0.1);
}

/* Phone mask styling */
input[type="tel"] {
    letter-spacing: 0.5px;
}

/* Rating stars */
.stars {
    color: #fbbf24;
}

/* Yandex rating badge */
.yandex-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Mobile menu animation */
#mobile-menu.open {
    transform: translateX(0);
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Section spacing */
.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 48px 0;
    }
}

/* Price table */
.price-row:hover {
    background-color: rgba(26, 127, 55, 0.05);
}

/* Calculator styles */
.calc-option {
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.calc-option:hover {
    border-color: rgba(26, 127, 55, 0.5);
}

.calc-option.active {
    border-color: var(--color-primary);
    background-color: rgba(26, 127, 55, 0.05);
}

/* Back to top button */
#back-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#back-top.visible {
    opacity: 1;
    visibility: visible;
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s ease;
    z-index: 100;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image lazy loading placeholder */
.img-placeholder {
    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; }
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    background-color: var(--color-primary);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
    border: none;
    background-color: var(--color-primary);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Line clamp for review text */
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Global blockquote */
blockquote, .blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    margin-bottom: 24px !important;
    background: #f0fdf4;
    border-radius: 0 8px 8px 0;
    color: #374151;
}

blockquote p:last-child, .blockquote p:last-child {
    margin-bottom: 0;
}

blockquote a, .blockquote a {
    color: var(--color-primary);
    font-weight: 600;
}

blockquote a:hover, .blockquote a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Text-block content typography (same as content block) */
.tb-text {
    line-height: 1.7;
}

@media (min-width: 768px) {
    .tb-text {
        line-height: 1.8;
    }
}

.tb-text p {
    margin-bottom: 12px;
}

.tb-text p:last-child {
    margin-bottom: 0;
}

/* H2 inside text-block */
.tb-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-top: 24px;
    margin-bottom: 16px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .tb-text h2 {
        font-size: 22px;
        margin-top: 28px;
        margin-bottom: 12px;
    }
}

@media (min-width: 1024px) {
    .tb-text h2 {
        font-size: 26px;
        margin-top: 32px;
        margin-bottom: 14px;
    }
}

.tb-text > h2:first-child {
    margin-top: 0;
}

/* Lists in text-block */
.tb-text ul,
.tb-text ol {
    margin: 16px 0;
    padding-left: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .tb-text ul,
    .tb-text ol {
        margin: 24px 0;
    }
}

.tb-text li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .tb-text li {
        padding-left: 28px;
        margin-bottom: 12px;
        line-height: 1.7;
    }
}

.tb-text li:last-child {
    margin-bottom: 0;
}

/* Bullet points */
.tb-text ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
}

@media (min-width: 768px) {
    .tb-text ul li::before {
        top: 10px;
        width: 8px;
        height: 8px;
    }
}

/* Numbered lists */
.tb-text ol {
    counter-reset: item;
}

.tb-text ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: var(--color-primary);
}

/* Adjacent elements spacing */
.tb-text p + ul,
.tb-text p + ol {
    margin-top: 16px;
}

.tb-text ul + p,
.tb-text ol + p {
    margin-top: 24px;
}

.tb-text h2 + p {
    margin-top: 0;
}

/* Content block table - no outer borders */
.cb-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.cb-table th,
.cb-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.cb-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.cb-table th:not(:last-child),
.cb-table td:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.cb-table tbody tr:last-child td {
    border-bottom: none;
}

.cb-table tbody tr:hover {
    background: #f9fafb;
}

@media (max-width: 640px) {
    .cb-table {
        font-size: 14px;
    }
    .cb-table th,
    .cb-table td {
        padding: 8px 10px;
    }
}

/* Pricing-simple custom table */
.ps-custom-table table {
    width: 100%;
    border-collapse: collapse;
}

.ps-custom-table th,
.ps-custom-table td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.ps-custom-table th {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
}

.ps-custom-table th:not(:last-child),
.ps-custom-table td:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.ps-custom-table tbody tr:last-child td {
    border-bottom: none;
}

.ps-custom-table tbody tr:hover {
    background: #f9fafb;
}

.ps-custom-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #111827;
}

@media (max-width: 640px) {
    .ps-custom-table th,
    .ps-custom-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
