/**
 * YetiCrane.com - Main Stylesheet
 * Professional Crane Company Website
 */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --secondary-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --font-family-primary: 'Inter', sans-serif;
    --font-family-heading: 'Roboto Slab', serif;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 0.375rem;
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--dark-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    line-height: 1.3;
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ===== HEADER STYLES ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-family: var(--font-family-heading);
    font-size: 1.75rem !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(25, 118, 210, 0.1);
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.9), rgba(21, 101, 192, 0.9)),
                url('/assets/images/hero-bg.jpg') center/cover;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.service-card .icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== STATS SECTION ===== */
.stats {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-item .stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===== GALLERY STYLES ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 4/3;
    cursor: pointer;
}

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

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

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 118, 210, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-item .overlay i {
    font-size: 2rem;
    color: white;
}

/* ===== FORM STYLES ===== */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

.form-floating > label {
    color: var(--gray-color);
}

/* ===== CONTACT SECTION ===== */
.contact-info {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

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

.contact-item .icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* ===== FOOTER STYLES ===== */
.footer {
    background: linear-gradient(135deg, #212529, #343a40) !important;
}

.footer h5,
.footer h6 {
    color: white;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--secondary-color) !important;
}

.emergency-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

/* ===== UTILITY CLASSES ===== */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
    .hero {
        min-height: 60vh;
        text-align: center;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero {
        min-height: 50vh;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item .stat-number {
        font-size: 2.5rem;
    }
}

/* ===== LIGHTBOX STYLES ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.lightbox .close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox .close:hover {
    opacity: 0.7;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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