/*
* US Roofing Direct - Main Stylesheet
* Author: US Roofing Direct
*/

/* ======= Base Styles ======= */
:root {
    --primary-color: #d9534f;
    --primary-dark: #c1121f;
    --secondary-color: #1a2e44;
    --accent-color: #e7ba4c; /* Updated to match the gold underline in screenshot */
    --light-color: #f1faee;
    --dark-color: #1a2e44;
    --gray-color: #a8a8a8;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --black: #000000;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

section {
    padding: 80px 0;
}

.btn {
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 5px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-light {
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-header h2:after {
    content: "";
    position: absolute;
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--accent-color);
}

/* ======= Header Styles ======= */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-info span {
    margin-right: 20px;
}

.top-info a {
    color: var(--white);
}

.top-social {
    text-align: right;
}

.top-social a {
    color: var(--white);
    margin-left: 15px;
    font-size: 16px;
}

.navbar {
    background-color: var(--white);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.5s ease;
}

.logo {
    max-height: 60px;
    width: auto;
}

.navbar-nav {
    margin-left: auto;
}

.nav-item {
    margin: 0 5px;
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
    font-family: var(--font-primary);
    padding: 8px 15px !important;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-btn {
    margin-left: 15px;
}

/* ======= Hero Section ======= */
.hero-section {
    background: url('../assets/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Hero overlay navigation */
.hero-overlay-nav {
    position: absolute;
    top: 90px; /* Position to cover the existing navigation */
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    background-color: #fff; /* Solid white background */
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hero-overlay-nav ul {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    width: 100%;
}

.hero-overlay-nav ul li {
    margin: 0 25px;
}

.hero-overlay-nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.hero-overlay-nav ul li a:hover {
    /* No color change on hover */
}

.hero-overlay-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color); /* Change underline color to match text */
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.hero-overlay-nav ul li a:hover::after {
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    line-height: 1.7;
}

.financing-banner {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #000;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.hero-buttons .btn {
    margin-right: 15px;
}

.hero-info-boxes {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.info-box {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
}

.info-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.info-box h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.info-box p {
    color: var(--light-color);
    margin-bottom: 0;
}

/* ======= Statistics Banner ======= */
.statistics-banner {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    flex: 1;
    padding: 0 15px;
}

.stat-item h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--white);
}

.stat-item p {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--white);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
}

.text-warning {
    color: var(--accent-color) !important;
}

@media (max-width: 767px) {
    .stats-row {
        flex-direction: column;
    }
    
    .stat-item {
        margin: 10px 0;
    }
    
    .stat-item h2 {
        font-size: 2rem;
        margin-bottom: 2px;
    }
    
    .stat-item p {
        font-size: 0.9rem;
    }
    
    .stat-divider {
        width: 80%;
        height: 1px;
        margin: 3px auto;
    }
}

/* ======= Services Section ======= */
.services-section {
    background-color: var(--light-gray);
}

.service-card {
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-image {
    height: 180px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 8px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-image img:hover {
    transform: scale(1.05);
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.service-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.service-link:hover i {
    margin-left: 10px;
}

.service-features {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    text-align: left;
}

.service-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-features li:before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

/* ======= About Section ======= */
.about-section {
    background-color: var(--white);
    padding: 50px 0;
}

.about-section .about-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.about-section .col-lg-6 {
    display: flex;
    align-items: center;
}

.about-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.about-content {
    padding: 10px 20px;
}

.about-content h2 {
    color: var(--secondary-color);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.title-underline {
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin-bottom: 15px;
}

.about-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.about-features {
    margin-top: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.feature-item i {
    color: var(--accent-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.feature-item span {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Ensure about section is properly responsive */
@media (max-width: 991px) {
    .about-section .about-row {
        flex-direction: row !important;
    }
}

@media (max-width: 767px) {
    .about-section .about-row {
        flex-direction: column !important;
    }
    
    .about-section .about-row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .about-image {
        margin-bottom: 30px;
        max-height: 350px;
    }
}

/* ======= Testimonials Section ======= */
.testimonials-section {
    background-color: var(--light-gray);
}

.testimonial-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    position: relative;
    height: 100%;
}

.testimonial-rating {
    color: #FFD700;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--gray-color);
    margin-bottom: 0;
}

/* ======= CTA Section ======= */
.cta-section {
    background: linear-gradient(rgba(229, 57, 70, 0.9), rgba(193, 18, 31, 0.9)), url('../assets/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--white);
    padding: 70px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-phone {
    margin-top: 20px;
    font-size: 1.1rem;
}

.cta-phone a {
    color: var(--white);
    font-weight: 700;
    text-decoration: underline;
}

/* ======= Quote Form Section ======= */
.quote-container {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.quote-card {
    background-color: white;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.quote-card h1 {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 20px;
}

.quote-divider {
    height: 4px;
    width: 60px;
    background-color: var(--primary-color);
    margin: 0 auto 25px;
}

.quote-intro {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.form-section h3 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-section label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 167, 60, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-weight: normal;
    padding-left: 5px;
}

.form-check-inline {
    margin-right: 15px;
    margin-bottom: 10px;
}

textarea.form-control {
    height: auto;
}

.form-text {
    line-height: 1.5;
}

.estimate-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 4px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.estimate-btn:hover {
    background-color: #d49542;
    border-color: #d49542;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .quote-card {
        padding: 25px;
    }
    
    .quote-card h1 {
        font-size: 1.75rem;
    }
    
    .form-check-inline {
        display: block;
        margin-right: 0;
    }
    
    .estimate-btn {
        width: 100%;
    }
}

/* ======= Contact Section ======= */
.contact-section {
    background-color: var(--white);
}

.contact-info {
    padding-right: 30px;
}

.info-item {
    display: flex;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 20px;
    width: 50px;
    text-align: center;
}

.info-item h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.info-item a {
    color: var(--secondary-color);
}

.contact-form {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 50px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 5px;
}

textarea.form-control {
    height: auto;
}

/* ======= Footer ======= */
.site-footer {
    background-color: var(--dark-color);
    color: var(--white);
    font-size: 15px;
}

.footer-top {
    padding: 60px 0 30px;
}

.footer-logo {
    max-height: 60px;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 20px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4:after,
.footer-services h4:after,
.footer-contact h4:after {
    content: "";
    position: absolute;
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 15px;
}

.footer-links a,
.footer-services a {
    color: #ddd;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-services a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-contact a {
    color: #ddd;
}

.footer-bottom {
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.copyright {
    margin: 0;
}

.footer-bottom-links {
    text-align: right;
}

.footer-bottom-links a {
    color: #ddd;
    margin-left: 15px;
}

/* ======= Responsive ======= */
@media (max-width: 991px) {
    section {
        padding: 60px 0;
    }
    
    .top-info, .top-social {
        text-align: center;
    }
    
    .top-social {
        margin-top: 10px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-info-boxes {
        margin-top: 40px;
    }
    
    .nav-btn {
        margin-top: 10px;
        margin-left: 0;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
    
    .contact-info {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .footer-info, .footer-links, .footer-services, .footer-contact {
        margin-bottom: 30px;
    }
    
    .footer-bottom-links {
        text-align: center;
        margin-top: 10px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        height: 60vh;
    }
    
    .hero-overlay-nav ul {
        padding: 10px 20px;
    }
    
    .hero-overlay-nav ul li {
        margin: 0 8px;
    }
    
    .hero-overlay-nav ul li a {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .footer-bottom-links a {
        margin: 0 8px;
    }
    
    .service-card {
        margin-bottom: 20px;
    }
    
    .service-image {
        height: 160px;
    }
    
    .col-lg-3.col-md-6 {
        margin-bottom: 20px;
    }
}

@media (max-width: 575px) {
    .service-image {
        height: 140px;
    }
    .top-bar {
        display: none;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .logo {
        max-height: 50px;
    }
    
    .hero-section {
        height: 50vh;
    }
    
    .hero-overlay-nav {
        top: 15px;
    }
    
    .hero-overlay-nav ul {
        flex-wrap: wrap;
        padding: 8px 15px;
        justify-content: center;
    }
    
    .hero-overlay-nav ul li {
        margin: 4px;
    }
    
    .hero-overlay-nav ul li a {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .info-item i {
        font-size: 1.5rem;
    }
}

/* ======= Animations ======= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
