/* 
   Sage Rhythm Fitness
   Основні стилі сайту
*/

/* Скидання стилів та базові налаштування */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #285c4d;
    --secondary-color: #f5e1be;
    --text-color: #333;
    --light-text:#fff;
    --bg-color: #fff;
    --section-bg: #f9f9f9;
    --border-color: #ddd;
    --success-color: #4caf50;
    --error-color: #f44336;
    --beginner-color: #8bc34a;
    --intermediate-color: #ffc107;
    --advanced-color: #ff5722;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --container-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    line-height: 1.5;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #1a3e33;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.rounded-image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a3e33;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(40, 92, 77, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(40, 92, 77, 0.3);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* Заголовки секцій */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: 0;
    left: 20%;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0.5rem auto 0;
}

/* Хвилясті розділювачі */
.wave-divider {
    width: 100%;
    height: 100px;
    margin-top: -1px;
    position: relative;
    overflow: hidden;
}

.wave-divider--flipped {
    transform: rotate(180deg);
    margin-bottom: -1px;
    margin-top: 0;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Хедер і навігація */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo svg {
    margin-right: 10px;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-item--heading {
    font-weight: 600;
}

.nav-item--heading span {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    color: var(--primary-color);
}

.nav-sublist {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10;
}

.nav-item--heading:hover .nav-sublist {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-sublist li {
    padding: 0;
}

.nav-sublist a {
    display: block;
    padding: 8px 20px;
    color: var(--text-color);
}

.nav-sublist a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.nav-item a {
    display: block;
    padding: 10px 0;
}

/* Герой секція */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-background {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-image-container {
    width: 100%;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(40, 92, 77, 0.8), rgba(40, 92, 77, 0.4));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    color: white;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-buttons .btn-outline {
    border-color: white;
    color: white;
}

.hero-buttons .btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 400px;
}

.stat-item {
    text-align: center;
    flex-basis: calc(33.333% - 20px);
}

.stat-number {
    display: block;
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Секція про нас */
.about-section {
    background-color: var(--section-bg);
    padding: 80px 0 0;
    position: relative;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
}

.about-image {
    flex: 0 0 45%;
}

.about-text {
    flex: 0 0 55%;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.benefits-list svg {
    margin-right: 15px;
    flex-shrink: 0;
}

/* Секція програм */
.programs-section {
    padding: 80px 0 0;
    position: relative;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.program-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background-color: white;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.program-image {
    height: 220px;
    overflow: hidden;
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.program-card:hover .program-image img {
    transform: scale(1.05);
}

.program-content {
    padding: 25px;
}

.program-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background-color: var(--beginner-color);
    color: white;
}

.program-card:nth-child(3) .program-level,
.program-card:nth-child(4) .program-level {
    background-color: var(--intermediate-color);
}

.program-card:nth-child(5) .program-level,
.program-card:nth-child(6) .program-level {
    background-color: var(--advanced-color);
}

.program-benefits {
    margin: 1rem 0 1.5rem;
}

/* Секція обладнання */
.facilities-section {
    background-color: var(--section-bg);
    padding: 80px 0 0;
    position: relative;
}

.facilities-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-weight: 600;
}

/* Секція розкладу */
.schedule-section {
    padding: 80px 0 0;
    position: relative;
}

.schedule-container {
    margin-bottom: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: white;
}

.schedule-grid {
    display: grid;
    grid-template-rows: auto 1fr;
}

.schedule-header {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    background-color: var(--primary-color);
    color: white;
}

.day-column {
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.schedule-content {
    display: grid;
    grid-template-rows: repeat(4, auto);
}

.time-row {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.time-row:last-child {
    border-bottom: none;
}

.time-label {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.class-item {
    padding: 15px;
    border-left: 1px solid var(--border-color);
    transition: var(--transition);
}

.class-item:hover {
    background-color: #f9f9f9;
}

.class-name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.class-level {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.class-item--beginner {
    border-left: 4px solid var(--beginner-color);
}

.class-item--intermediate {
    border-left: 4px solid var(--intermediate-color);
}

.class-item--advanced {
    border-left: 4px solid var(--advanced-color);
}

.schedule-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background-color: #f5f5f5;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
}

.legend-color--beginner {
    background-color: var(--beginner-color);
}

.legend-color--intermediate {
    background-color: var(--intermediate-color);
}

.legend-color--advanced {
    background-color: var(--advanced-color);
}

/* Секція локацій */
.locations-section {
    background-color: var(--section-bg);
    padding: 80px 0 0;
    position: relative;
}

.locations-map {
    margin-bottom: 40px;
}

.city-map {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.location-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    transition: var(--transition);
}

.location-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.location-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.location-details h3 {
    margin-bottom: 10px;
}

/* Секція харчування */
.nutrition-section {
    padding: 80px 0 0;
    position: relative;
}

.nutrition-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
}

.nutrition-text {
    flex: 0 0 60%;
}

.nutrition-image {
    flex: 0 0 40%;
}

.nutrition-principles {
    margin-top: 20px;
}

.principle-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.principle-item svg {
    margin-right: 15px;
    flex-shrink: 0;
}

.principle-text h4 {
    margin-bottom: 10px;
}

/* Секція FAQ */
.faq-section {
    background-color: var(--section-bg);
    padding: 80px 0 0;
    position: relative;
}

.faq-container {
    margin-bottom: 80px;
}

.faq-item {
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.25rem;
}

.faq-icon {
    transition: var(--transition);
}

.faq-item:hover .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
}

/* Секція контактів */
.contact-section {
    padding: 80px 0;
    position: relative;
}

.contact-content {
    display: flex;
    gap: 40px;
}

.contact-info {
    flex: 0 0 40%;
}

.contact-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item svg {
    margin-right: 15px;
    flex-shrink: 0;
}

.insurance-partners {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-form-wrapper {
    flex: 0 0 60%;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.contact-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 92, 77, 0.2);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
}

.form-checkbox input {
    width: auto;
    margin-right: 10px;
    margin-top: 4px;
}

.form-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
}

/* Футер */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-item h3 {
    color: white;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.footer-item h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: 0;
    left: 0;
}

.footer-logo .logo {
    margin-bottom: 15px;
}

.footer-logo .logo span {
    color: white;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
}

.newsletter-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Адаптивні стилі */
@media (max-width: 1200px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .hero-stats {
        max-width: 600px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    html {
        font-size: 15px;
    }

    .about-content,
    .nutrition-content {
        flex-direction: column;
    }

    .about-image,
    .about-text,
    .nutrition-text,
    .nutrition-image {
        flex: 0 0 100%;
    }

    .contact-content {
        flex-direction: column;
    }

    .contact-info,
    .contact-form-wrapper {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .hero-background {
        height: 500px;
    }

    .site-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        margin: 5px 10px;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .facilities-gallery {
        grid-template-columns: 1fr;
    }

    .time-row {
        display: flex;
        flex-direction: column;
    }

    .time-label {
        width: 100%;
    }

    .class-item {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .locations-list {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-stats {
        justify-content: center;
    }
    
    .stat-item {
        flex-basis: 100%;
    }

    .schedule-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: var(--border-radius);
    }
}

@media (max-width: 375px) {
    html {
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
    }
}