/*
* main.css (Updated with direct color definitions)
* Main CSS for Tekrota Ahşap website
*/

@import url('language-switcher.css');
@import url('responsive.css');
@import url('blog.css');
@import url('order-form.css');

/* Base Layout */
body {
    font-family: var(--body-font);
    color: var(--text-color);
    font-size: var(--font-size-base);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--background-primary);
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: clamp(50px, 10vw, 100px) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-bold);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.5px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.3px;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 20px;
}

.lead-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #2c2c2c;
    margin-bottom: 30px;
}

/* Section Headers */
.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #0055a4; /* Brand blue */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0055a4; /* Brand blue */
}

.section-title {
    margin-bottom: 30px;
    position: relative;
}

.section-title .highlight {
    color: #0055a4; /* Brand blue */
    position: relative;
    z-index: 1;
}

.section-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: rgba(0, 85, 164, 0.1); /* Light blue background */
    z-index: -1;
}

.text-center .section-subtitle::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-description {
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
    color: #555555; /* Text light color */
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-container {
    display: flex;
    gap: 5px;
    align-items: center;
}

.loader-bar {
    width: 4px;
    height: 30px;
    background-color: #0055a4; /* Brand blue */
    border-radius: 2px;
    animation: loader-wave 1.2s ease-in-out infinite;
}

.loader-bar:nth-child(1) {
    animation-delay: 0s;
}

.loader-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.loader-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.loader-bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes loader-wave {
    0%, 40%, 100% {
        transform: scaleY(1);
        background-color: #0055a4; /* Brand blue */
    }
    20% {
        transform: scaleY(1.5);
        background-color: #e40000; /* Brand red */
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
    min-width: 160px;
    text-align: center;
}

.primary-btn {
    background-color: #0055a4; /* Brand blue */
    color: #ffffff;
}

.primary-btn:hover {
    background-color: #e40000; /* Brand red */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.outline-btn {
    background-color: transparent;
    color: #2c2c2c; /* Text color */
    border: 2px solid #2c2c2c;
}

.outline-btn:hover {
    background-color: #2c2c2c;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.outline-light-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.outline-light-btn:hover {
    background-color: #ffffff;
    color: #0055a4; /* Brand blue */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-link {
    color: #0055a4; /* Brand blue */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.btn-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn-link:hover {
    color: #e40000; /* Brand red */
}

.btn-link:hover i {
    transform: translateX(5px);
}

.btn.with-icon i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn.with-icon:hover i {
    transform: translateX(5px);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
    position: relative;
    width: 100%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
    position: relative;
    width: 100%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
    position: relative;
    width: 100%;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.bg-light {
    background-color: #f9f7f5; /* Background secondary */
}

.bg-dark {
    background-color: #1a1a2e; /* Background dark */
    color: #ffffff;
}

.light {
    color: #ffffff;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0055a4; /* Brand blue */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #e40000; /* Brand red */
    transform: translateY(-5px);
}

/* Media Queries */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .section-padding {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .lead-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 24px;
        min-width: 140px;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: linear-gradient(45deg, #25d366, #128c7e);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.7);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 98;
    animation: whatsapp-bounce 2s ease-in-out infinite, whatsapp-glow 2s ease-in-out infinite;
    overflow: hidden;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.whatsapp-float:hover::before {
    left: 100%;
}

.whatsapp-float:hover {
    transform: translateY(-5px) rotate(360deg) scale(1.15);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4), 0 0 20px rgba(37, 211, 102, 0.6);
    background: linear-gradient(45deg, #128c7e, #25d366);
}

.whatsapp-float i {
    margin: 0;
    animation: whatsapp-shake 2s ease-in-out infinite;
}

.whatsapp-float:hover i {
    animation: none;
}

/* WhatsApp Text Bubble */
.whatsapp-float::after {
    content: 'WhatsApp';
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #25d366;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-float:hover::after {
    opacity: 1;
    right: 85px;
}

@keyframes whatsapp-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes whatsapp-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

@keyframes whatsapp-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(-15deg);
    }
    20% {
        transform: rotate(15deg);
    }
    30% {
        transform: rotate(-10deg);
    }
    40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Mobile adjustments for WhatsApp */
@media (max-width: 576px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float::after {
        display: none;
    }
}