/* Custom CSS for Cornerstone Building Innovations */

/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-muted: #6c757d;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Navbar Logo */
.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)),
                url('../Images/PHOTO-2025-10-30-17-13-31.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.service-card i {
    transition: transform 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.1);
}

/* Portfolio Items */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.portfolio-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

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

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

/* Contact Form */
.contact-form {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Contact Info */
.contact-info i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-info:hover i {
    transform: scale(1.1);
    color: var(--secondary-color) !important;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
        text-align: center;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .portfolio-item img {
        height: 200px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Mobile Lightbox Styles */
    .lightbox-container {
        padding: 10px;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }

    .lightbox-image {
        max-height: 60vh;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-info {
        padding: 12px 15px;
        margin-top: 10px;
        max-width: 90vw;
    }

    .lightbox-title {
        font-size: 1.1rem;
    }

    .lightbox-description {
        font-size: 0.9rem;
    }

    .lightbox-thumbnails {
        bottom: 15px;
        max-width: 95vw;
    }

    .lightbox-thumbnail {
        width: 50px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 70vh;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Extra small mobile lightbox adjustments */
    .lightbox-image {
        max-height: 55vh;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-info {
        padding: 10px 12px;
        margin-top: 8px;
    }

    .lightbox-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .lightbox-description {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .lightbox-counter {
        font-size: 0.8rem;
    }

    .lightbox-thumbnails {
        bottom: 10px;
    }

    .lightbox-thumbnail {
        width: 45px;
        height: 30px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio Specific Styles */
.portfolio-hero {
    background: linear-gradient(135deg, var(--light-color) 0%, #e3f2fd 100%);
}

.hero-image-grid img {
    transition: transform 0.3s ease;
}

.hero-image-grid:hover img {
    transform: scale(1.02);
}

.portfolio-filters .btn {
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.portfolio-filters .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    height: 250px;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-card .portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Show overlay on hover for desktop */
@media (min-width: 768px) {
    .portfolio-card:hover .portfolio-overlay {
        transform: translateY(0);
    }
}

/* Always show overlay on mobile */
@media (max-width: 767px) {
    .portfolio-card .portfolio-overlay {
        position: static;
        background: rgba(0,0,0,0.8);
        transform: translateY(0);
        padding: 1rem;
        margin-top: -60px;
        z-index: 2;
        border-radius: 0 0 0.5rem 0.5rem;
    }

    .portfolio-card {
        height: auto;
    }

    .portfolio-card img {
        height: 200px;
    }
}

.portfolio-content {
    color: white;
}

/* Lightbox Gallery Styles */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.lightbox-title {
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.lightbox-description {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.lightbox-counter {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Thumbnails */
.lightbox-thumbnails {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    padding: 0 10px;
}

.lightbox-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lightbox-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Touch-friendly improvements */
.portfolio-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lightbox-modal {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.lightbox-image {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.lightbox-thumbnail {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* About Page Styles */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.story-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.value-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.feature-list .d-flex {
    transition: transform 0.2s ease;
}

.feature-list .d-flex:hover {
    transform: translateX(5px);
}

/* Contact Page Styles */
.contact-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-highlight {
    transition: transform 0.3s ease;
}

.contact-highlight:hover {
    transform: translateY(-3px);
}

.contact-form-wrapper {
    transition: box-shadow 0.3s ease;
}

.contact-form-wrapper:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.process-step {
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
}

.step-number {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.1);
}

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

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

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--light-color) 0%, #e3f2fd 100%);
}
