/*
    Contractor Web Design Hosting Website Redesign
    Theme Colors:
    - Primary Dark: #1a1a2e
    - Secondary Dark: #16213e
    - Primary Accent: #0f3460
    - Highlight/CTA: #e94560
    - Text Light: #e3e3e3
    - White: #ffffff
*/

/* 1. ==== GLOBAL STYLES & RESET ==== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-dark: #1a1a2e;
    --secondary-dark: #16213e;
    --primary-accent: #0f3460;
    --highlight-cta: #e94560;
    --text-light: #e3e3e3;
    --text-dark: #333;
    --white: #ffffff;
    --light-bg: #f4f7fc;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-height: 80px;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-dark);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { font-size: 1rem; margin-bottom: 1rem; }
a { text-decoration: none; color: var(--highlight-cta); transition: color 0.3s ease; }
a:hover { color: #d13c54; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.dark-bg {
    background-color: var(--primary-dark);
    color: var(--text-light);
}
.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4 {
    color: var(--white);
}
.dark-bg p {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

/* 2. ==== BUTTONS & FORMS ==== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--highlight-cta);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #d13c54;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(233, 69, 96, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.2);
}

/* 3. ==== HEADER & NAVIGATION ==== */
#main-header {
    background-color: var(--primary-dark);
    color: var(--white);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
    background-color: rgba(26, 26, 46, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    color: var(--white);
}

.logo {
    height: 50px;
    filter: invert(1);
    margin-right: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links li a {
    color: var(--text-light);
    font-weight: 400;
    position: relative;
    padding: 5px 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--highlight-cta);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a.active,
.nav-links li a:hover {
    color: var(--white);
}

.nav-cta {
    display: block;
}

/* Mobile Navigation */
.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* 4. ==== HERO SECTION ==== */
#hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #e94560);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -15px); }
    60% { transform: translate(-50%, -8px); }
}

/* 5. ==== SECTION TITLE ==== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title span {
    color: var(--highlight-cta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.section-title h2 {
    margin-bottom: 10px;
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    color: #666;
}

/* 6. ==== SERVICES SECTION ==== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(15, 52, 96, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--highlight-cta);
    margin-bottom: 20px;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--highlight-cta);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-accent);
}

.service-card p {
    color: #555;
    margin-bottom: 20px;
}

.learn-more-link {
    font-weight: 600;
    color: var(--primary-accent);
}

.learn-more-link i {
    transition: transform 0.3s ease;
    margin-left: 5px;
}

.service-card:hover .learn-more-link i {
    transform: translateX(5px);
}

/* 7. ==== ABOUT US SECTION ==== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.about-image-container {
    position: relative;
}

.about-image {
    width: 100%;
    padding-top: 110%; /* Aspect ratio */
    background: url('https://i.picsum.photos/id/15/1000/1200.jpg') center/cover no-repeat;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-image-container::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80%;
    height: 80%;
    background: var(--highlight-cta);
    border-radius: 10px;
    z-index: -1;
    opacity: 0.8;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.about-features i {
    color: var(--highlight-cta);
    font-size: 1.2rem;
    margin-top: 5px;
}

/* 8. ==== INTERACTIVE REPORT SECTION ==== */
.report-dashboard {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.report-header h3 {
    color: var(--primary-accent);
}

.report-date {
    background: #e3e3e3;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-card, .chart-card {
    background: #f9fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eef;
}

.kpi-card h4, .chart-card h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.kpi-change {
    font-weight: 600;
}
.kpi-change.positive { color: #28a745; }
.kpi-change.negative { color: #dc3545; }

.sparkline svg {
    margin-top: 10px;
}

.chart-card {
    grid-column: span 2;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bar-label {
    width: 60px;
    font-size: 0.9rem;
}
.bar {
    height: 20px;
    border-radius: 5px;
    animation: bar-load 1s ease-out;
}
@keyframes bar-load {
    from { width: 0; }
}
.bar-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.pie-chart-container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pie-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        #0f3460 0% 45%,
        #537895 45% 80%,
        #e94560 80% 100%
    );
    animation: pie-load 1s ease-out;
    transform: rotate(-90deg);
}
@keyframes pie-load {
    from { transform: scale(0) rotate(-90deg); }
}
.pie-legend {
    list-style: none;
}
.pie-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.pie-legend .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* 9. ==== TESTIMONIALS SECTION ==== */
.testimonial-slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 40px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}
.testimonial-slide.active {
    display: block;
    opacity: 1;
}

.testimonial-slide .fa-quote-left {
    font-size: 2.5rem;
    color: var(--highlight-cta);
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 30px;
}

.author-name {
    font-weight: 700;
}
.author-title {
    color: #aaa;
    margin: 0;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.slider-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.slider-controls button:hover {
    background: var(--highlight-cta);
}

/* 10. ==== INTERACTIVE CALCULATOR SECTION ==== */
.calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    display: flex;
    overflow: hidden;
}

.calculator-form {
    padding: 40px;
    width: 60%;
}

.calculator-form h4, .calculator-result h4 {
    color: var(--primary-accent);
    margin-bottom: 20px;
}

.service-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.service-checkbox label {
    display: block;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.service-checkbox input {
    display: none;
}

.service-checkbox input:checked + label {
    border-color: var(--highlight-cta);
    background: rgba(233, 69, 96, 0.1);
    color: var(--highlight-cta);
}

.calculator-result {
    width: 40%;
    background: var(--primary-accent);
    color: var(--white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.calculator-result h4 {
    color: var(--white);
}

.estimate-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.disclaimer {
    font-size: 0.8rem;
    opacity: 0.8;
}
.disclaimer a {
    color: var(--white);
    text-decoration: underline;
}

/* 11. ==== FINAL CTA SECTION ==== */
#final-cta {
    background: linear-gradient(to right, var(--primary-accent), var(--secondary-dark));
    color: var(--white);
}
#final-cta h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
#final-cta p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
}

/* 12. ==== FOOTER ==== */
#main-footer {
    background: var(--secondary-dark);
    color: var(--text-light);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-about .logo-text {
    font-size: 1.8rem;
}
.footer-about p {
    margin-top: 15px;
    margin-bottom: 20px;
    max-width: 300px;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-right: 15px;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--highlight-cta);
    border-color: var(--highlight-cta);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-grid h4 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-grid h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--highlight-cta);
}

.footer-links ul li, .footer-legal ul li, .footer-contact ul li {
    margin-bottom: 10px;
}

.footer-links ul li a, .footer-legal ul li a {
    color: var(--text-light);
}
.footer-links ul li a:hover, .footer-legal ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 20px 0;
}

/* 13. ==== INNER PAGES (CONTACT, LEGAL) ==== */
#page-header {
    background: var(--primary-dark);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}
#page-header h1 {
    color: var(--white);
}

#contact-details .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
}
.contact-info h3, .contact-form-container h3 {
    color: var(--primary-accent);
    margin-bottom: 20px;
}
.contact-info ul li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}
.contact-info ul li i {
    font-size: 1.5rem;
    color: var(--highlight-cta);
    margin-top: 5px;
    width: 30px;
    text-align: center;
}
.contact-info h4 {
    margin-bottom: 5px;
}
.contact-info p {
    margin: 0;
}

.contact-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

#legal-content {
    background: var(--white);
}
#legal-content .container {
    max-width: 800px;
}
#legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-accent);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
#legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}
#legal-content ul li {
    margin-bottom: 0.5rem;
}


/* 14. ==== ANIMATIONS ==== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll.fade-in-left { transform: translateX(-50px); }
.animate-on-scroll.fade-in-right { transform: translateX(50px); }
.animate-on-scroll.fade-in-up { transform: translateY(50px); }
.animate-on-scroll.fade-in { transform: translateY(0); }

.animate-on-scroll.fade-in-left.visible,
.animate-on-scroll.fade-in-right.visible,
.animate-on-scroll.fade-in-up.visible,
.animate-on-scroll.fade-in.visible {
    transform: translate(0, 0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }


/* 15. ==== RESPONSIVENESS ==== */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }

    .nav-cta { display: none; }
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 300px;
        height: calc(100vh - var(--header-height));
        background-color: var(--primary-dark);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        gap: 20px;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    .nav-links.active {
        right: 0;
    }
    .hamburger-menu {
        display: flex;
    }
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-image-container {
        max-width: 400px;
        margin: 0 auto 40px;
    }
    .about-content .section-title {
        text-align: center;
    }

    .report-grid {
        grid-template-columns: 1fr 1fr;
    }
    .kpi-card { grid-column: span 1; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-about, .footer-contact {
        grid-column: span 2;
    }
    
    #contact-details .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .section-padding { padding: 60px 0; }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .hero-content p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .report-grid {
        grid-template-columns: 1fr;
    }
    .chart-card { grid-column: span 1; }

    .calculator-wrapper {
        flex-direction: column;
    }
    .calculator-form, .calculator-result {
        width: 100%;
    }
    .calculator-result {
        padding: 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-about, .footer-contact, .footer-links, .footer-legal {
        grid-column: span 1;
    }
    .footer-about p { margin: 15px auto 20px; }
    .footer-grid h4::after { left: 50%; transform: translateX(-50%); }
    .footer-contact ul li { justify-content: center; }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-options {
        grid-template-columns: 1fr;
    }
    .slider-controls {
        position: static;
        transform: none;
        margin-top: 20px;
        justify-content: center;
        gap: 20px;
    }
}