/* style.css - Kings Heavy Machinery
 * Matching live website with black/yellow color scheme and multi-page structure
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors matching logo - red/black/grey scheme */
    --primary-white: #ffffff;
    --secondary-bg: #f8f9fa;
    --accent-red: #E31837;
    --accent-red-dark: #C1121F;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light-gray: #999999;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--primary-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--accent-red);
    font-size: 1.8rem;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.logo-text span {
    color: var(--accent-red);
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent-red);
}

.cta-button {
    background-color: var(--accent-red);
    color: var(--primary-white);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.cta-button:hover {
    background-color: var(--accent-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Outlined button style (for "Get a Quote" button) */
.cta-button.outlined {
    background-color: transparent;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}

.cta-button.outlined:hover {
    background-color: var(--accent-red);
    color: var(--primary-white);
    box-shadow: 0 4px 12px var(--shadow-medium);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== HERO CAROUSEL SECTION ===== */
.hero-carousel {
    position: relative;
    height: 600px;
    max-height: 80vh;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-position: center center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-white);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    color: var(--accent-red);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--primary-white);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hover-highlight {
    color: var(--accent-red);
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: default;
}

.hover-highlight:hover {
    color: var(--accent-red-dark);
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(227, 24, 55, 0.3);
}

.hover-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}

.hover-highlight:hover::after {
    width: 100%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .cta-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-width: 180px;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.carousel-nav-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-nav-btn:hover {
    background-color: var(--accent-red);
    color: var(--primary-white);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 0.75rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--accent-red);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background-color: var(--accent-red-dark);
}

/* ===== SECTIONS ===== */
.page-section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

.card-img {
    width: 100%;
    min-height: 250px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-img i {
    color: var(--white);
    font-size: 3rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    border-radius: 8px;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--accent-red);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.card-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-content ul {
    list-style: none;
    padding: 0;
}

.card-content ul li {
    color: var(--text-gray);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.card-content ul li::before {
    content: '•';
    color: var(--accent-red);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ===== ABOUT/WHO WE ARE ===== */
.history-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}

.history-text h3 {
    color: var(--accent-red);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.history-text p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.milestones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.milestone-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-red);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.milestone-card h4 {
    color: var(--accent-red);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.milestone-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== PROJECTS ===== */
.project-highlight {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-medium);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.project-highlight-img {
    width: 100%;
    min-height: 400px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.project-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem 1.5rem 1.5rem;
}

.project-overlay-text h3 {
    color: var(--accent-red);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.project-highlight-content {
    padding: 2rem;
}

.project-highlight-content h3 {
    color: var(--accent-red);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-highlight-content p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-tag {
    background-color: var(--accent-red);
    color: var(--primary-white);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid var(--accent-red);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 0.3rem;
}

.stat-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== CONTACT ===== */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-info {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.contact-info h3 {
    color: var(--accent-red);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.contact-detail i {
    color: var(--accent-red);
    font-size: 1.2rem;
    margin-right: 1rem;
}

.contact-detail div p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background-color: var(--primary-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.15);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--text-dark);
    color: var(--primary-white);
    padding: 3rem 1.5rem 2rem;
    border-top: 3px solid var(--accent-red);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-white);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-red);
}

.footer-contact-item {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-item i {
    color: var(--accent-red);
    margin-top: 0.2rem;
}

.footer-contact-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-white);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--accent-red);
    color: var(--primary-white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.copyright a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.copyright a:hover {
    color: var(--accent-red);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav a {
        display: block;
        padding: 0.8rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero Carousel Responsive */
    .hero-carousel {
        height: 500px;
        max-height: 70vh;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-tagline {
        font-size: 1.1rem !important;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .cta-button {
        width: 100%;
        max-width: 280px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .carousel-nav {
        bottom: 1rem;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .content-container {
        padding: 1.5rem 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-blue { color: var(--accent-red); }
.text-gray { color: var(--text-gray); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
