/*
================================================
TABLE OF CONTENTS
================================================
1.  Global Styles & Variables
2.  Utility Classes
3.  Preloader
4.  Header & Navigation
5.  Hero Section
6.  Section Base Styles
7.  Services Section
8.  ROI Calculator Section
9.  Industries Section (Accordion)
10. Testimonials Section (Slider)
11. CTA Section
12. Footer
13. Contact Page
14. Legal Pages
15. Animations & Keyframes
16. Scroll Animations
17. Responsiveness (Media Queries)
    - 1200px (Large Desktops)
    - 992px (Tablets)
    - 768px (Mobile)
    - 480px (Small Mobile)
================================================
*/

/* 1. Global Styles & Variables
------------------------------------------------ */
:root {
    --primary-color: #f77f00;
    --secondary-color: #ffba08;
    --dark-bg: #3f220f;
    --dark-bg-secondary: #6a3d1a;
    --light-text: #fff3e0;
    --white-text: #ffffff;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Poppins', sans-serif;
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
    --shadow: 0 10px 30px -15px rgba(80, 40, 0, 0.7);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for sticky header */
}

body {
    font-family: var(--body-font);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    color: var(--white-text);
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 2. Utility Classes
------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 80px 0;
}

.dark-section {
    background-color: var(--dark-bg-secondary);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-speed);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white-text);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.section-title {
    margin-bottom: 60px;
}

.section-title h2 {
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--light-text);
}

.highlight {
    color: var(--primary-color);
}

/* 3. Preloader
------------------------------------------------ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    border: 8px solid var(--dark-bg-secondary);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* 4. Header & Navigation
------------------------------------------------ */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: rgba(94, 65, 3, 0.8);
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
}

#main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 60px;
    transition: var(--transition-speed);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--white-text);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.cta-button {
    margin-left: 2rem;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white-text);
    transition: all 0.3s ease-in-out;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dark-bg-secondary);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: var(--border-radius);
    padding: 10px 0;
    animation: fadeIn 0.3s ease;
}

.dropdown-content a {
    color: var(--light-text);
    padding: 12px 16px;
    display: block;
    transition: var(--transition-speed);
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 5. Hero Section
------------------------------------------------ */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(rgba(94, 52, 3, 0.507), rgba(94, 77, 3, 0.425)), url('https://images.unsplash.com/photo-1517048676732-d65bc937f952?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80') no-repeat center center/cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--light-text);
}

.hero-buttons .btn {
    margin: 0 10px;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down-indicator a {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
}

.scroll-down-indicator span {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: scroll-anim 2s infinite;
}

/* 6. Section Base Styles
------------------------------------------------ */
.section-padding {
    padding: 100px 0;
}

/* 7. Services Section
------------------------------------------------ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--dark-bg-secondary);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-speed);
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: rgba(0, 180, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-speed);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary-color);
    transition: var(--transition-speed);
}

.service-card:hover .service-icon {
    background-color: var(--primary-color);
}

.service-card:hover .service-icon svg {
    color: var(--dark-bg);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--white-text);
}

.service-card p {
    color: var(--light-text);
}

.learn-more-link {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 20px;
    display: inline-block;
}

/* 8. ROI Calculator Section
------------------------------------------------ */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background: var(--dark-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.calculator-form .form-group {
    margin-bottom: 30px;
}

.calculator-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.calculator-form input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--dark-bg-secondary);
    outline: none;
    border-radius: 5px;
}

.calculator-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.calculator-form input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.calculator-form .form-group span {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-weight: 600;
    color: var(--secondary-color);
}

.calculator-results {
    background-color: var(--dark-bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calculator-results h4 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.result-item {
    margin-bottom: 20px;
}

.result-item p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.result-item span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.calculator-results .disclaimer {
    font-size: 0.8rem;
    margin-top: auto;
    color: var(--light-text);
}

/* 9. Industries Section (Accordion)
------------------------------------------------ */
.industries-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.industries-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.accordion-item {
    background: var(--dark-bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--dark-bg-secondary);
    transition: var(--transition-speed);
}

.accordion-item.active {
    border-color: var(--primary-color);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
}

.accordion-header h3 {
    margin: 0;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition-speed);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion-body p {
    padding: 0 20px 20px;
    margin: 0;
    color: var(--light-text);
}

.accordion-item.active .accordion-body {
    max-height: 200px;
    /* Adjust as needed */
}

/* 10. Testimonials Section (Slider)
------------------------------------------------ */
.testimonial-slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 50px;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--white-text);
}

.testimonial-author h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--light-text);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 180, 216, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--white-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-speed);
}

.slider-nav:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.slider-nav.prev {
    left: 0;
}

.slider-nav.next {
    right: 0;
}

/* 11. CTA Section
------------------------------------------------ */
#cta {
    background: linear-gradient(to right, var(--dark-bg-secondary), var(--dark-bg));
}

#cta h2 {
    margin-bottom: 20px;
}

#cta p {
    max-width: 600px;
    margin: 0 auto 30px;
}

/* 12. Footer
------------------------------------------------ */
#main-footer {
    background-color: var(--dark-bg-secondary);
    padding-top: 60px;
    border-top: 3px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col .footer-logo img {
    height: 60px;
    margin-bottom: 20px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--white-text);
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p {
    font-size: 0.9rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--light-text);
}

.footer-col ul li a:hover {
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.legal-links a {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* 13. Contact Page
------------------------------------------------ */
#contact-page .section-title p {
    max-width: 500px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-form-wrapper {
    background: var(--dark-bg-secondary);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--dark-bg);
    border: 1px solid var(--dark-bg-secondary);
    border-radius: var(--border-radius);
    color: var(--white-text);
    font-size: 1rem;
    transition: var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.form-group textarea {
    resize: vertical;
}

.contact-info-wrapper h3 {
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 30px;
}

.contact-details li {
    margin-bottom: 15px;
}

.contact-details li strong {
    display: block;
    color: var(--primary-color);
}

.map-placeholder {
    margin-top: 30px;
    height: 250px;
    background-color: var(--dark-bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--primary-color);
}

/* 14. Legal Pages
------------------------------------------------ */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark-bg-secondary);
    padding: 50px;
    border-radius: var(--border-radius);
}

.legal-content h1 {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

.legal-content h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
}

.legal-content ul li {
    margin-bottom: 10px;
}

/* 15. Animations & Keyframes
------------------------------------------------ */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes scroll-anim {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    80% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 16. Scroll Animations
------------------------------------------------ */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}


/* 17. Responsiveness (Media Queries)
------------------------------------------------ */

/* 1200px (Large Desktops) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .hero-content h1 {
        font-size: 3.8rem;
    }
}

/* 992px (Tablets) */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        /* Adjust to header height */
        flex-direction: column;
        background-color: var(--dark-bg);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 20px 0;
        width: 100%;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .dropdown-content {
        position: static;
        display: none;
        background-color: transparent;
        box-shadow: none;
        width: 100%;
        padding: 0;
    }

    .nav-item.dropdown:hover .dropdown-content {
        display: block;
        /* Always show on hover in mobile menu context */
    }

    .dropdown-content a {
        padding: 10px 0;
        font-size: 1rem;
        color: var(--light-text);
        background-color: rgba(2, 62, 138, 0.5);
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .cta-button {
        display: none;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .industries-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        margin-top: 20px;
    }

    .industries-image {
        margin-bottom: 40px;
    }
}


/* 768px (Mobile) */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 80%;
        max-width: 300px;
        margin: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .testimonial-slider-container {
        padding: 0;
    }

    .slider-nav {
        top: auto;
        bottom: -60px;
        transform: translateY(0);
    }

    .slider-nav.prev {
        left: 30%;
    }

    .slider-nav.next {
        right: 30%;
    }

    .testimonial-slider {
        height: 300px;
    }

    .contact-grid {
        gap: 30px;
    }

    .contact-form-wrapper,
    .legal-content {
        padding: 25px;
    }

}

/* 480px (Small Mobile) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}