/**
 * BS Solar Website - Main Stylesheet
 * Custom styles to complement Tailwind CSS
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --solar-blue: #1E3A5F;
    --solar-blue-light: #2E5A8F;
    --solar-orange: #F7931E;
    --solar-green: #28A745;
    --solar-gray: #F0F4F8;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Main content wrapper - ensure it stays above background */
#main-content {
    position: relative;
    z-index: 1;
}

/* Footer - ensure proper stacking */
footer {
    position: relative;
    z-index: 1;
}

/* ========================================
   SOLAR BACKGROUND PATTERN
   ======================================== */
.solar-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: url('../../saveimages/backgrounds/solar-bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.solar-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(30, 58, 95, 0.7) 50%, rgba(247, 147, 30, 0.3) 100%);
}

/* ========================================
   GLASSMORPHISM STYLES
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-white {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(30, 58, 95, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Transparent Sections */
.section-transparent {
    background: transparent !important;
}

.section-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Selection color */
::selection {
    background: var(--solar-orange);
    color: var(--white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--solar-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--solar-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--solar-blue-light);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(30, 58, 95, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #e8850a;
    border-color: #e8850a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--solar-blue);
    border: 2px solid var(--solar-blue);
}

.btn-secondary:hover {
    background: var(--solar-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--solar-blue);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 24px;
}

/* Service Cards */
.service-card {
    text-align: center;
    padding: 40px 24px;
}

.service-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--solar-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--solar-orange);
    transition: all var(--transition-normal);
}

.service-card:hover .icon {
    background: var(--solar-orange);
    color: var(--white);
    transform: scale(1.1);
}

/* ========================================
   STATISTICS COUNTER
   ======================================== */
.stat-item {
    text-align: center;
    padding: 24px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--solar-orange);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--solar-gray);
}

.section-dark {
    background: var(--solar-blue);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(247, 147, 30, 0.1);
    color: var(--solar-orange);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--solar-blue);
    margin-bottom: 16px;
}

.section-dark .section-title {
    color: var(--white);
}

.section-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonial-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 80px;
    color: var(--solar-orange);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 16px;
}

.testimonial-rating {
    color: #FFD700;
    margin-bottom: 4px;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--solar-orange);
    box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #EF4444;
}

.form-error {
    color: #EF4444;
    font-size: 14px;
    margin-top: 4px;
}

/* ========================================
   PAGE HEADER (INTERNAL PAGES)
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--solar-blue) 0%, var(--solar-blue-light) 100%);
    padding: 120px 0 60px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 100px;
    opacity: 0.5;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--solar-orange);
}

.breadcrumb-separator {
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
    color: var(--solar-orange);
}

/* ========================================
   GALLERY / LIGHTBOX
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(30, 58, 95, 0.9));
    color: var(--white);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ========================================
   BLOG CARDS
   ======================================== */
.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

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

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.blog-card-category {
    background: var(--solar-orange);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   CLIENTS LOGO SLIDER
   ======================================== */
.clients-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
}

.clients-slider img {
    max-height: 60px;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-normal);
}

.clients-slider img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ========================================
   HIGHLIGHT BANNER
   ======================================== */
.highlight-banner {
    background: linear-gradient(135deg, var(--solar-orange) 0%, #e8850a 100%);
    color: var(--white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.highlight-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.highlight-price {
    font-size: 3rem;
    font-weight: 700;
}

.highlight-price small {
    font-size: 1.5rem;
    font-weight: 400;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--solar-gray);
    border-top-color: var(--solar-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-solar-blue { color: var(--solar-blue); }
.text-solar-orange { color: var(--solar-orange); }
.text-solar-green { color: var(--solar-green); }
.bg-solar-blue { background-color: var(--solar-blue); }
.bg-solar-orange { background-color: var(--solar-orange); }
.bg-solar-gray { background-color: var(--solar-gray); }

.gradient-text {
    background: linear-gradient(135deg, var(--solar-blue), var(--solar-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover underline effect */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--solar-orange);
    transition: width var(--transition-normal);
}

.hover-underline:hover::after {
    width: 100%;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}
