/*
    This file contains foundational styles for the entire website.
    It sets up the base typography, colors, and other global settings.
*/

		/* ------------------------------------------- */
        /* Base Typography & Body                      */
        /* ------------------------------------------- */
        body {
            font-family: 'Roboto', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
            line-height: 1.6;
            background-color: #f4f4f4;
            color: #333;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            padding-top: 100px; /* Add padding to prevent content from being hidden behind the fixed header */
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }

        /* Basic container styles */
        .container-fluid {
            width: 100%;
        }

        .container {
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
            padding-left: 1rem;
            padding-right: 1rem;
        }
        @media (min-width: 768px) {
            .container {
                padding-left: 2rem;
                padding-right: 2rem;
            }
        }
        /* Fixed Header */
        #main-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 50;
			background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
            padding: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            display: flex;
            align-items: center;
            justify-content: flex-start; /* Changed to left align */
        }
        
        #main-header .container {
            display: flex;
            align-items: center;
            justify-content: flex-start; /* Changed to left align */
            width: 100%;
        }

        #main-header img {
            height: 3rem;
            width: 3rem;
            object-fit: contain;
            border-radius: 9999px;
            flex-shrink: 0;
        }
        
        #main-header .title-container {
            flex-grow: 1;
            text-align: left; /* Changed to left align */
            margin-left: 0.75rem; /* Added spacing */
        }

        #main-header h1 {
            font-size: 1.25rem;
            line-height: 1.75rem;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
        }

        #main-header p {
            font-size: 0.75rem;
            line-height: 1rem;
            color: #d1d5db;
            display: none;
        }

        @media (min-width: 768px) {
            #main-header {
                padding: 0.5rem 2rem; /* Adjusted padding */
            }
            #main-header .container {
                justify-content: flex-start;
            }
            #main-header .title-container {
                text-align: left;
                margin-left: 1rem;
            }
            #main-header h1 {
                font-size: 1.5rem;
                line-height: 2rem;
            }
            #main-header p {
                display: block;
            }
        }
		
        /* ------------------------------------------- */
        /* Links                                       */
        /* ------------------------------------------- */
        a {
            color: #007bff;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        a:hover {
            color: #0056b3;
        }

        /* ------------------------------------------- */
        /* Headings and Elements                       */
        /* ------------------------------------------- */
        h1, h2, h3, h4, h5, h6 {
            line-height: 1.2;
            margin-bottom: 0.5em;
            font-weight: bold;
        }

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

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

		
/* Content Carousel Begin ======================================================== */
/* The main carousel container. We set its position to relative so the nav buttons can be positioned absolutely inside it. */
        /* Content Carousel Styles */
        #carousel {
			margin-top: 0;
            padding: 0px;
            position: relative;
        }
        .custom-carousel-container {
            position: relative;
            max-width: 1170px;
            height: 500px;
            overflow: hidden;
            margin: 0 auto;
            background-color: #ffffff;
        }
        .custom-carousel-slides {
            display: flex;
            height: 100%;
            transition: transform 0.5s ease-in-out;
        }
        .no-transition {
            transition: none !important;
        }
        .carousel-slide {
            flex-shrink: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 2rem;
            color: #333;
            text-align: center;
            background-size: cover;
            background-position: center;
            position: relative;
        }

        .carousel-slide-content {
            background-color: rgba(255, 255, 255, 0.8);
            padding: 20px;
            border-radius: 5px;
            text-align: center;
            max-width: 80%;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }
        .carousel-slide-content h2 {
            font-size: 3rem;
            margin-bottom: 10px;
            color: #4A2D0E;
        }
        .carousel-slide-content span {
            font-size: 1.2rem;
            line-height: 1.6;
            margin-bottom: 0px;
            color: #6D4C41;
            display: block;
        }
        .carousel-slide-content button, .card-button {
            padding: 12px 24px;
            width: 220px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            border-color: #be4a1c;
            border-radius: 5px;
            cursor: pointer;
            text-transform: uppercase;
            background-image: linear-gradient(to bottom, #af9153 0, #815d17 100%);
            background-repeat: repeat-x;
            text-shadow: 0 -1px 0 rgba(0,0,0,.2);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);
            color: #fff;
            transition: background-image 0.3s;
        }
        .carousel-slide-content button:hover, .card-button:hover {
            background-image: linear-gradient(to bottom, #815d17 0, #af9153 100%);
			color: white;
        }
        .carousel-slide-content a, .card-button {
            text-decoration: none;
			color: #fff;
        }
		
        .carousel-slide-content button::after, .card-button:after {
            content: "";
            display: block;
            width: 10px;
            height: 18px;
            margin-left: 5px;
            background-image: url("/images/button-arrow.png");
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }
        .carousel-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            padding: 10px;
            font-size: 2rem;
            cursor: pointer;
            z-index: 10;
            border-radius: 8px;
            margin-top: -2px;
        }
        .prev-btn {
            left: 10px;
        }
        .next-btn {
            right: 10px;
        }
        .carousel-dots-container {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
        }
        .carousel-dot {
            width: 15px;
            height: 15px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 50%;
            cursor: pointer;
            transition: background 0.3s;
        }
        .carousel-dot.active {
            background: orange;
            cursor: default;
        }
/* Content Carousel End ======================================================== */

    /* Section and Card Styles */
        main {
            padding: 1rem;
            margin-top: 2rem;
            margin-bottom: 2rem;
            background-color: rgba(255, 255, 255, 0.8);
            border-radius: 1rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        @media (min-width: 768px) {
            main {
                padding: 2rem;
            }
        }

        section {
            margin-top: 4rem;
            margin-bottom: 4rem;
        }
		.about-us {
			text-align:center;
		}
		.about-us p {
			color: black;
		}
        .text-center { text-align: center; }
        .max-w-3xl { max-width: 48rem; }
        .mx-auto { margin-left: auto; margin-right: auto; }
        
        h2 {
            font-size: 2.25rem;
            line-height: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }
        
        h3 {
            font-size: 1.5rem;
            line-height: 2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        p {
            font-size: 1.125rem;
            line-height: 1.75rem;
            color: #6b7280;
        }

        .section-separator {
            width: 50%;
            height: 1px;
            background-color: #d1d5db;
            margin-top: 4rem;
            margin-bottom: 4rem;
            margin-left: auto;
            margin-right: auto;
        }

        .card-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
        }

/* * ----------------------------------------------------
 * BASE CARD GRID STYLES (Applies to ALL screen sizes)
 * ----------------------------------------------------
 * We use Flexbox here to enable wrapping and the crucial 
 * "center the last row" behavior.
 */
.card-grid-products,
.card-grid-services {
    display: flex;
    flex-wrap: wrap;
    
    /* THE FIX: This ensures the entire collection of cards (including the partial last row)
       is centered in the container, regardless of how many cards are present. */
    justify-content: center;
    
    /* Use gap for consistent spacing between cards */
    gap: 2rem; 
}

/* * Base card item style: Sets up mobile (1 column) by default.
 */
.card-grid-products .card,
.card-grid-services .card {
    /* Ensures the card will fill the space if needed */
    flex-grow: 1; 
    
    /* On mobile, flex-basis is ignored and the card is 100% due to no min-width set, 
       but we set a safety default here. */
    flex-basis: 100%;
}


/* * ----------------------------------------------------
 * 768px AND UP (Tablet: Max 2 Columns)
 * ----------------------------------------------------
 * Sets the basis so that only 2 cards can fit per row.
 */
@media (min-width: 768px) {
    .card-grid-products .card,
    .card-grid-services .card {
        /* Calculates 50% width minus half the gap, ensuring max 2 cards fit. 
           If only 1 card is left on a row, flex-grow: 1 makes it 100% wide. */
        flex-basis: calc(50% - 2.5rem); 
    }
}

/* * ----------------------------------------------------
 * NEW MEDIA QUERY: 1024px AND UP (Desktop: Max 3 Columns)
 * ----------------------------------------------------
 * Sets the basis so that only 3 cards can fit per row.
 */
@media (min-width: 1024px) {
    .card-grid-products .card,
    .card-grid-services .card {
        /* Calculates 33.333% width minus a portion of the gap, ensuring max 3 cards fit. 
           If only 2 cards are left on a row, flex-grow: 1 makes them 50% width each. */
        flex-basis: calc(33.333% - 2.5rem); 
    }
}


        
        .card {
            background-color: white;
            padding: 1.5rem; /* Added padding to all cards */
            border-radius: 1rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transition: box-shadow 0.3s ease;
        }
        
        .card:hover {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        .card-image {
            width: 100%;
            height: 12rem;
            object-fit: cover;
            border-radius: 0.75rem;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }
        
        .card:hover .card-image {
            transform: scale(1.1);
        }

        .card p {
            margin-bottom: 1rem;
        }
		        /* Footer Styles */
        footer {
            background-color: rgba(0, 0, 0, 0.8);
            color: white !important;
            padding: 2rem;
            text-align: center;
        }
		footer p {
			color: white !important;
		}
@media (max-width: 565px) {
    .carousel-slide h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    .carousel-slide span {
        line-height: 1.3;
    }
}
@media (max-width: 392px) {
    .carousel-slide span {
        line-height: 1.0;
    }
}