/* 
* Travyanistaya Grusha - Main Stylesheet
* Version: 1.0
* Author: Travyanistaya Grusha Team
* Description: Main stylesheet for renovation services website
*/

/* ======================================================
   Table of Contents:
   1. CSS Reset and Base Styles
   2. Typography
   3. Layout & Grid
   4. Header & Navigation
   5. Footer
   6. Components
   7. Home Page Sections
   8. Blog & Articles
   9. Legal Pages
   10. Forms
   11. Thank You Page
   12. Media Queries
====================================================== */

/* 1. CSS Reset and Base Styles
====================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%; /* 10px */
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

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

a {
    color: #2c5d8f;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a3b5c;
}

ul, ol {
    list-style-position: inside;
}

/* 2. Typography
====================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: #222;
}

h1 {
    font-size: 3.6rem;
}

h2 {
    font-size: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 6rem;
    height: 0.3rem;
    background-color: #2c5d8f;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

/* 3. Layout & Grid
====================================================== */
.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

.page-header {
    background-color: #f5f5f5;
    padding: 6rem 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 1rem;
}

/* 4. Header & Navigation
====================================================== */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    display: flex;
    align-items: center;
    color: #222;
}

.logo img {
    height: 4rem;
    margin-right: 1rem;
}

.logo span {
    font-size: 1.8rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2c5d8f;
    transition: width 0.3s ease;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 3rem;
    height: 2.1rem;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    height: 0.3rem;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 5. Footer
====================================================== */
footer {
    background-color: #222;
    color: #fff;
    padding: 6rem 0 2rem;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-column {
    flex: 1;
    min-width: 25rem;
    margin-bottom: 3rem;
    padding-right: 2rem;
}

.footer-column h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 4rem;
    height: 2px;
    background-color: #2c5d8f;
}

.footer-column p {
    color: #bbb;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 1rem;
}

.footer-column ul li a {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

.footer-bottom p {
    color: #bbb;
    margin-bottom: 0;
}

/* 6. Components
====================================================== */
/* Buttons */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: #2c5d8f;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1a3b5c;
    color: #fff;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

.btn-tertiary {
    background-color: transparent;
    color: #2c5d8f;
    border: 1px solid #2c5d8f;
}

.btn-tertiary:hover {
    background-color: #f5f5f5;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #2c5d8f;
}

.social-icons a img {
    width: 2rem;
    height: 2rem;
}

/* Cards */
.service-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
}

.service-icon img {
    width: 4rem;
    height: 4rem;
}

.service-card h3 {
    margin-bottom: 1.5rem;
}

/* Portfolio Items */
.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 30rem;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

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

.portfolio-overlay h3 {
    color: #fff;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonial {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    margin: 2rem 0;
}

.testimonial-content {
    margin-bottom: 2rem;
}

.testimonial-content p {
    font-style: italic;
    position: relative;
    padding: 0 2rem;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 3rem;
    color: #2c5d8f;
    position: absolute;
}

.testimonial-content p::before {
    left: 0;
    top: -1rem;
}

.testimonial-content p::after {
    right: 0;
    bottom: -2rem;
}

.testimonial-author h4 {
    margin-bottom: 0.5rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-controls button {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ddd;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-controls button:hover {
    background-color: #2c5d8f;
    color: #fff;
    border-color: #2c5d8f;
}

/* 7. Home Page Sections
====================================================== */
/* Banner Section */
.banner {
    background-color: #f5f5f5;
    padding: 10rem 0;
}

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

.banner-content {
    flex: 1;
    max-width: 60rem;
}

.banner-content h1 {
    font-size: 4.8rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.banner-content p {
    font-size: 2rem;
    margin-bottom: 3rem;
}

.banner-image {
    flex: 1;
    max-width: 50rem;
    margin-left: 5rem;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    gap: 3rem;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    gap: 3rem;
}

/* Blog Preview Section */
.blog-preview {
    background-color: #f5f5f5;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(35rem, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.blog-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-card img {
    width: 100%;
    height: 25rem;
    object-fit: cover;
}

.blog-content {
    padding: 2rem;
}

.blog-content h3 {
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 2rem;
}

.blog-link {
    text-align: center;
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.contact-info {
    flex: 1;
    min-width: 30rem;
}

.contact-form {
    flex: 2;
    min-width: 40rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-item img {
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 1.5rem;
}

.social-media {
    margin-top: 4rem;
}

/* 8. Blog & Articles
====================================================== */
.blog-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.blog-item {
    display: flex;
    flex-wrap: wrap;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-image {
    flex: 1;
    min-width: 30rem;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    flex: 2;
    min-width: 40rem;
    padding: 3rem;
}

.blog-date {
    color: #777;
    margin-bottom: 1.5rem;
}

.blog-excerpt {
    margin-bottom: 2rem;
}

.newsletter {
    background-color: #2c5d8f;
    color: #fff;
    padding: 6rem 0;
}

.newsletter-content {
    text-align: center;
    max-width: 70rem;
    margin: 0 auto;
}

.newsletter-content h2 {
    color: #fff;
}

.newsletter-content h2::after {
    background-color: #fff;
    margin: 0 auto;
    left: 0;
    right: 0;
}

.newsletter-form {
    margin-top: 3rem;
}

.newsletter-form .form-group {
    display: flex;
    max-width: 50rem;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1.5rem 2rem;
    border: none;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    border-radius: 0 5px 5px 0;
}

/* Article Page */
.blog-article {
    padding-top: 4rem;
}

.article-header {
    margin-bottom: 3rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #666;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2c5d8f;
}

.article-meta {
    color: #777;
    margin-bottom: 2rem;
}

.article-featured-image {
    margin-bottom: 4rem;
    border-radius: 10px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

.article-content {
    max-width: 80rem;
    margin: 0 auto;
}

.article-content h2 {
    margin-top: 4rem;
}

.article-content h3 {
    margin-top: 3rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 2rem;
    margin-left: 2rem;
}

.article-content li {
    margin-bottom: 1rem;
}

.article-share {
    margin: 5rem 0;
    padding: 3rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.related-posts {
    margin-bottom: 5rem;
}

.related-posts h3 {
    margin-bottom: 3rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    gap: 3rem;
}

.related-post {
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post img {
    width: 100%;
    height: 20rem;
    object-fit: cover;
}

.related-post h4 {
    padding: 1.5rem;
    margin-bottom: 0;
}

.related-post a {
    display: block;
    padding: 0 1.5rem 1.5rem;
    color: #2c5d8f;
    font-weight: 600;
}

.cta {
    background-color: #f5f5f5;
    padding: 6rem 0;
}

.cta-content {
    text-align: center;
    max-width: 70rem;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: 2rem;
}

.cta-content h2::after {
    left: 0;
    right: 0;
    margin: 0 auto;
}

.cta-content p {
    margin-bottom: 3rem;
}

/* 9. Legal Pages
====================================================== */
.legal-document {
    max-width: 80rem;
    margin: 0 auto;
    padding: 4rem 0;
}

.last-updated {
    color: #777;
    font-style: italic;
    margin-bottom: 3rem;
}

.legal-document h2 {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.legal-document h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.legal-document ul, 
.legal-document ol {
    margin-bottom: 2rem;
    margin-left: 2rem;
}

.legal-document li {
    margin-bottom: 1rem;
}

/* 10. Forms
====================================================== */
.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

input, 
textarea, 
select {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1.6rem;
}

input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: #2c5d8f;
    box-shadow: 0 0 0 2px rgba(44, 93, 143, 0.2);
}

textarea {
    resize: vertical;
    min-height: 12rem;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin-right: 1rem;
    margin-top: 0.5rem;
}

/* 11. Thank You Page
====================================================== */
.thank-you {
    padding: 10rem 0;
    text-align: center;
}

.thank-you-content {
    max-width: 60rem;
    margin: 0 auto;
}

.thank-you-content img {
    width: 12rem;
    height: 12rem;
    margin: 0 auto 3rem;
}

.thank-you-content h1 {
    margin-bottom: 2rem;
}

.thank-you-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
}

/* 12. Media Queries
====================================================== */
@media (max-width: 1024px) {
    html {
        font-size: 58%;
    }
    
    .banner .container {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-content {
        margin-bottom: 4rem;
    }
    
    .banner-image {
        margin-left: 0;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 55%;
    }
    
    section {
        padding: 6rem 0;
    }
    
    h1 {
        font-size: 3.2rem;
    }
    
    h2 {
        font-size: 2.6rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 8rem;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        opacity: 0;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .blog-item {
        flex-direction: column;
    }
    
    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 50%;
    }
    
    .service-card {
        padding: 2rem;
    }
}
