/* Base CSS - Common variables and styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Main Color Palette */
    --primary-color: #0b3c6d;
    --primary-light: #1a5f9e;
    --primary-dark: #052a4e;
    --secondary-color: #ff7e00;
    --secondary-light: #ff9a3f;
    --secondary-dark: #e06d00;
    
    /* Neutral Colors */
    --dark-color: #1a1a1a;
    --dark-gray: #333;
    --medium-gray: #777;
    --light-gray: #e0e0e0;
    --light-color: #f8f9fa;
    --off-white: #f5f5f5;
    
    /* Text Colors */
    --text-color: #252525;
    --text-light: #6c757d;
    
    /* Utility Variables */
    --border-color: #e6e6e6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius-sm: 4px;
    --border-radius: 6px;
    --border-radius-lg: 12px;
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Accommodate fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 100px 0 80px;
    position: relative;
}

/* First section on each page - reduced top padding */
.section:first-of-type,
.section.first-section {
    padding-top: 20px;
}

/* Hero section should have no top padding */
.hero {
    padding-top: 0 !important;
}

/* Page header sections should have minimal top padding */
.page-header,
.prj_header_section,
.car_header_section,
.aboutpage_header_section {
    padding-top: 20px !important;
}

.bg-light {
    background-color: var(--off-white);
}

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

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

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

/* Preloader */
.bec-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.bec-loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-gray);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: var(--transition);
    display: inline-block;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: var(--gradient-secondary);
    color: white;
    border: 2px solid white;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: scaleX(0);
    transform-origin: right;
}

.btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn:hover {
    transform: translateY(-5px);
    color: white;
    border: 2px solid white;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-5px);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-title.text-left::after {
    left: 0;
    transform: none;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 1rem auto 0;
}

/* Common Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.animate {
    transition: all 1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 2px solid white;
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Responsive Base Styles */
@media screen and (max-width: 1200px) {
    .section {
        padding: 80px 0 60px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 768px) {
    .section {
        padding: 50px 0 40px;
    }
    
    .section:first-of-type,
    .section.first-section {
        padding-top: 10px;
    }
    
    .page-header,
    .prj_header_section,
    .car_header_section,
    .aboutpage_header_section {
        padding-top: 10px !important;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media screen and (max-width: 576px) {
    .section {
        padding: 40px 0 30px;
    }
    
    .section:first-of-type,
    .section.first-section {
        padding-top: 5px;
    }
    
    .page-header,
    .prj_header_section,
    .car_header_section,
    .aboutpage_header_section {
        padding-top: 5px !important;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
}