/* 
 * Billiard O - Main Stylesheet
 * A modern, responsive design for a billiard club website
 */

/* ===== CSS Variables ===== */
:root {
    /* Color Palette */
    --primary-color: #1a2639;       /* Dark blue for primary backgrounds */
    --secondary-color: #c24d2c;     /* Rust/orange for accents and highlights */
    --tertiary-color: #3e4a61;      /* Medium blue for secondary elements */
    --light-color: #f9f9f9;         /* Off-white for text on dark backgrounds */
    --dark-color: #121212;          /* Near black for dark elements */
    --gray-color: #6c757d;          /* Medium gray for subtle elements */
    --overlay-color: rgba(26, 38, 57, 0.85); /* Semi-transparent overlay */
    
    /* Typography */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ===== Base Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--tertiary-color);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.hidden {
    display: none !important;
}

/* ===== Language Selector ===== */
.language-selector {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 1000;
    display: flex;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.language-selector button {
    background: none;
    border: none;
    padding: 8px 12px;
    color: var(--gray-color);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.language-selector button.active {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.language-selector button:hover:not(.active) {
    color: var(--light-color);
}

/* ===== Header ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 38, 57, 0.95);
    z-index: 100;
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
}

#header.scrolled {
    padding: 10px 0;
    background-color: rgba(26, 38, 57, 0.98);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--light-color);
    font-size: 1.8rem;
    margin: 0;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: var(--spacing-md);
}

.main-nav ul li a {
    color: var(--light-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-medium);
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--light-color);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    background-image: url('../images/ui/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--light-color);
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--light-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: var(--light-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background-color: #a33d20;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--light-color);
}

/* ===== About Section ===== */
.about {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

/* Сам контейнер со списком карточек */
.about-features {
    flex: 1 1 100%;              /* ломаем строку и растягиваем на всю ширину секции */
    display: flex;               /* оставляем flex‑раскладку */
    flex-wrap: wrap;
    justify-content: center;     /* ровно по центру по горизонтали */
    gap: var(--spacing-md);      /* одинаковый отступ вместо margin у карточек */
    margin-top: var(--spacing-md);
}

/* Карточка‑фича */
.feature {
    flex: 0 1 320px;
    max-width: 320px;
    min-width: 200px;
    margin-bottom: var(--spacing-sm);
    text-align: center;
    padding: var(--spacing-md);
    background-color: #f5f5f5;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    max-height: 200px;
    height: 160px;
    overflow: hidden;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.about-price-highlight {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: #f5f5f5;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-price-highlight p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* ===== Services Section ===== */
.services {
    padding: var(--spacing-xl) 0;
    background-color: var(--primary-color);
    color: var(--light-color);
}

.services .section-title {
    color: var(--light-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.service-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: all var(--transition-medium);
}

.service-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.1);
}

.service-icon {
    margin-bottom: var(--spacing-sm);
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.service-item h3 {
    color: var(--light-color);
    margin-bottom: var(--spacing-sm);
}

.service-item p {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Gallery Section ===== */
.gallery {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-color);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--light-color);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.gallery-controls button {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-controls button:hover {
    background-color: var(--secondary-color);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    color: var(--light-color);
    text-align: center;
    padding: var(--spacing-sm) 0;
    font-size: 1.1rem;
    width: 100%;
}

.lightbox-counter {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    transition: color var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--secondary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2001;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--secondary-color);
}

/* ===== Video Section ===== */
.video {
    padding: var(--spacing-xl) 0;
    background-color: var(--tertiary-color);
    color: var(--light-color);
}

.video .section-title {
    color: var(--light-color);
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-md);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-container p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===== Location Section ===== */
.location {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-color);
}

.map-container {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.address-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: space-between;
}

.address-card {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background-color: #f5f5f5;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.address-card i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.address-details h3 {
    margin-bottom: var(--spacing-xs);
}

.address-details p {
    margin-bottom: 0;
    color: var(--gray-color);
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--primary-color);
    color: var(--light-color);
}

.contact .section-title {
    color: var(--light-color);
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-method {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-medium);
}

.contact-method:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.1);
}

.contact-method i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.contact-method h3 {
    color: var(--light-color);
    margin-bottom: var(--spacing-sm);
}

.contact-method a {
    color: var(--light-color);
    display: inline-block;
    margin-bottom: var(--spacing-xs);
}

.contact-method p {
    color: rgba(255, 255, 255, 0.8);
}

.whatsapp-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #25D366;
    color: white;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.whatsapp-button:hover {
    background-color: #128C7E;
    color: white;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
}

.contact-form h3 {
    color: var(--light-color);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--light-color);
    font-family: var(--body-font);
    transition: all var(--transition-fast);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.15);
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
    top: -20px;
    left: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.contact-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: var(--light-color);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.contact-form button:hover {
    background-color: #a33d20;
}

/* ===== Footer ===== */
#footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo h3 {
    color: var(--light-color);
    margin-bottom: var(--spacing-xs);
}

.footer-logo p {
    color: var(--gray-color);
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h4,
.footer-hours h4,
.footer-contact h4 {
    color: var(--light-color);
    margin-bottom: var(--spacing-sm);
}

.footer-links ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-links ul li a {
    color: var(--gray-color);
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

.footer-hours,
.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-hours p,
.footer-contact p {
    color: var(--gray-color);
    margin-bottom: var(--spacing-xs);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-color);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    color: var(--gray-color);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== WhatsApp Fixed Button ===== */
.whatsapp-fixed {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    transition: all var(--transition-medium);
}

.whatsapp-fixed:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    color: white;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.mb-5 {
    margin-bottom: var(--spacing-xl);
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mt-5 {
    margin-top: var(--spacing-xl);
}

@media (max-width: 600px) {
  .feature {
    padding: 10px 6px;
    min-width: unset;
    max-width: 100%;
    height: auto;
  }
  .feature i {
    font-size: 1.6rem;
    margin-bottom: 4px;
  }
  .feature h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
  }
  .about-features {
    gap: 8px;
  }
}

/* ===== Cookie Banner ===== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--light-color);
    padding: 18px 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2000;
    font-size: 1rem;
    max-width: 90vw;
    min-width: 260px;
}
.cookie-banner__message {
    flex: 1 1 auto;
    line-height: 1.5;
}
.cookie-banner__actions {
    display: flex;
    gap: 8px;
}
.cookie-banner__button {
    background: var(--secondary-color);
    color: var(--light-color);
    border: none;
    border-radius: var(--border-radius-md);
    padding: 7px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.cookie-banner__button:hover {
    background: var(--tertiary-color);
}
.cookie-banner__link {
    color: var(--light-color);
    text-decoration: underline;
    font-size: 0.95em;
    margin-left: 8px;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}
.cookie-banner__link:hover {
    opacity: 1;
}
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 12px;
        font-size: 0.95rem;
        bottom: 88px;
    }
    .cookie-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Акцент на кнопке согласия, кнопка отказа менее яркая */
.cookie-banner__button#cookie-accept {
    background: var(--secondary-color);
    color: var(--light-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(194,77,44,0.15);
    border: none;
}
.cookie-banner__button#cookie-accept:hover {
    background: var(--tertiary-color);
}
.cookie-banner__button#cookie-decline {
    background: #e0e0e0;
    color: var(--gray-color);
    font-weight: 500;
    border: none;
    box-shadow: none;
}
.cookie-banner__button#cookie-decline:hover {
    background: #cccccc;
    color: var(--dark-color);
}