/* Main Styles for Cleaning Company Website */

/* --- ROOT VARIABLES --- */
:root {
    /* Primary Colors - Neutral with Brutalist Touch */
    --color-primary: #2E2E2E;
    --color-primary-light: #3E3E3E;
    --color-primary-dark: #1E1E1E;
    
    /* Secondary/Accent Colors */
    --color-accent: #87BCBF;
    --color-accent-light: #A5D1D4;
    --color-accent-dark: #5A8F92;
    
    /* Neutrals */
    --color-white: #FFFFFF;
    --color-off-white: #F5F5F5;
    --color-light-gray: #E0E0E0;
    --color-mid-gray: #BDBDBD;
    --color-gray: #757575;
    --color-dark-gray: #424242;
    --color-black: #121212;
    
    /* Alert Colors */
    --color-success: #6FCF97;
    --color-error: #EB5757;
    --color-warning: #F2C94C;
    
    /* Brutalist Accents */
    --color-brutalist-1: #FFC107;
    --color-brutalist-2: #FF5722;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3.5rem;
    --spacing-xl: 5rem;
    
    /* Borders */
    --border-radius-sm: 3px;
    --border-radius-md: 6px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container */
    --container-width: 1200px;
    --container-padding: 1rem;
    
    /* Z-index layers */
    --z-back: -1;
    --z-normal: 1;
    --z-front: 10;
    --z-modal: 100;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-off-white);
    overflow-x: hidden;
}

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

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2.5rem;
    position: relative;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

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

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

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

ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

/* --- UTILITY CLASSES --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

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

.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); }

.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-white { color: var(--color-white); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

/* --- BUTTONS --- */
.btn,
button,
input[type='submit'] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn:hover,
button:hover,
input[type='submit']:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--color-accent-dark);
    color: var(--color-white);
    text-decoration: none;
}

.btn:active,
button:active,
input[type='submit']:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--primary:hover {
    background-color: var(--color-primary-light);
}

.btn--secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-accent);
}

.btn--secondary:hover {
    background-color: var(--color-accent-light);
    color: var(--color-primary-dark);
    border-color: var(--color-accent-dark);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--full {
    width: 100%;
    display: block;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-front);
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.logo:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.logo__text {
    color: inherit;
}

.nav__list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav__item {
    margin-left: var(--spacing-md);
}

.nav__link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
    padding-bottom: 2px;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-normal);
}

.nav__link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.nav__link:hover::after {
    width: 100%;
}

/* Burger Menu */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    box-shadow: none;
}

.burger-menu:hover {
    background: none;
    box-shadow: none;
    transform: none;
}

.burger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px 0;
    transition: all 0.3s ease;
    background-color: var(--color-primary);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-7px, -7px);
}

/* --- MAIN SECTIONS --- */

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--color-white);
    margin-top: 0;
    padding: var(--spacing-lg) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
    z-index: var(--z-back);
}

.hero__content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
    position: relative;
    z-index: var(--z-normal);
}

.hero__title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.hero__text {
    color: var(--color-white);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.hero__buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

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

.about__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-lg);
}

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

.about__image-container {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about__image-container img {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    transition: transform var(--transition-normal);
}

.about__image-container img:hover {
    transform: scale(1.02);
}

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

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    text-align: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--spacing-md);
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary-dark);
}

/* Events Section */
.events {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.events__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* Webinars Section */
.webinars {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-off-white);
}

.webinars__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* Media Section */
.media {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.media__content {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.media__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* FAQ Section */
.faq {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-off-white);
}

.faq__content {
    max-width: 900px;
    margin: 0 auto;
}

.accordion {
    width: 100%;
}

.accordion__item {
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    background-color: var(--color-white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--color-white);
    border: none;
    border-bottom: 1px solid var(--color-light-gray);
    text-align: left;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    box-shadow: none;
    transition: background-color var(--transition-normal);
}

.accordion__header:hover {
    background-color: var(--color-light-gray);
    box-shadow: none;
    transform: none;
}

.accordion__icon {
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
}

.accordion__item.active .accordion__icon {
    transform: rotate(45deg);
}

.accordion__content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-normal);
    background-color: var(--color-white);
}

.accordion__item.active .accordion__content {
    padding: var(--spacing-md);
    max-height: 1000px;
}

/* Behind the Scenes Section */
.behind-scenes {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.behind-scenes__content {
    margin-bottom: var(--spacing-lg);
}

.behind-scenes__text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto var(--spacing-lg);
}

.behind-scenes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* Awards Section */
.awards {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-off-white);
}

.awards__content {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.awards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* Resources Section */
.resources {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.resources__content {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

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

.resources__item {
    display: block;
    padding: var(--spacing-md);
    background-color: var(--color-off-white);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.resources__item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.resources__item h3 {
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
}

.resources__item p {
    color: var(--color-dark-gray);
}

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

.contact__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

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

.contact__details {
    margin-top: var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.contact__item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--color-accent-dark);
}

.contact__form-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--color-light-gray);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(135, 188, 191, 0.2);
    outline: none;
}

/* Footer */
.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer__info {
    display: flex;
    flex-direction: column;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    text-decoration: none;
}

.footer__logo:hover {
    color: var(--color-accent-light);
    text-decoration: none;
}

.footer h3 {
    color: var(--color-white);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
}

.footer ul {
    list-style: none;
    padding: 0;
}

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

.footer ul li a {
    color: var(--color-light-gray);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer ul li a:hover {
    color: var(--color-accent-light);
    text-decoration: none;
}

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

/* Social links in footer */
.footer__social ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer__social ul li a {
    display: inline-block;
    transition: transform var(--transition-normal);
}

.footer__social ul li a:hover {
    transform: translateX(5px);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-off-white);
}

.success-icon {
    font-size: 5rem;
    color: var(--color-success);
    margin-bottom: var(--spacing-md);
}

.success-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary-dark);
}

.success-message {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: var(--spacing-lg);
}

/* Terms & Privacy Pages */
.terms-page,
.privacy-page {
    padding-top: 100px;
    padding-bottom: var(--spacing-xl);
    background-color: var(--color-white);
}

.terms-content,
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

.terms-content h1,
.privacy-content h1 {
    margin-bottom: var(--spacing-lg);
}

.terms-content h2,
.privacy-content h2 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

/* Read More Links */
.read-more {
    display: inline-block;
    font-weight: 600;
    color: var(--color-accent-dark);
    text-decoration: none;
    position: relative;
    padding-right: 1.5em;
    transition: color var(--transition-normal);
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform var(--transition-normal);
}

.read-more:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.read-more:hover::after {
    transform: translate(5px, -50%);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero__title {
        font-size: 3rem;
    }
    
    .hero__text {
        font-size: 1.1rem;
    }
    
    .hero__buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        width: 80%;
        margin: 0 auto;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: var(--shadow-lg);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-normal);
        z-index: var(--z-modal);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        align-items: center;
    }
    
    .nav__item {
        margin: var(--spacing-sm) 0;
    }
    
    .burger-menu {
        display: block;
        z-index: calc(var(--z-modal) + 1);
    }
    
    .contact__inner,
    .about__inner {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .services__grid,
    .events__grid,
    .webinars__grid,
    .behind-scenes__grid,
    .awards__grid,
    .resources__grid {
        grid-template-columns: 1fr;
    }
    
    .footer__inner {
        grid-template-columns: 1fr;
    }
}

/* Page transition animations with barba.js */
.barba-container {
    position: relative;
}

.barba-container[data-barba="container"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.barba-container.barba-leave {
    opacity: 0;
}

.barba-container.barba-enter {
    opacity: 0;
}

.barba-container.barba-enter-active {
    opacity: 1;
}