/* 
   Precision Finish - Main Stylesheet
   A high-end converting website for an Exterior & Interior painter
*/

/* ===== Base Styles ===== */
:root {
    /* Primary Colors */
    --primary-color: #3d3c3c;
    --secondary-color: #58a5b2;
    --accent-color: #3498db;
    
    /* Neutral Colors */
    --dark: #1a1a1a;
    --medium-dark: #333333;
    --medium: #666666;
    --medium-light: #999999;
    --light: #f5f5f5;
    --white: #ffffff;
    
    /* Font Families */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
    
    /* Border Radius */
    --border-radius-sm: 3px;
    --border-radius-md: 5px;
    --border-radius-lg: 10px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--medium-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--medium);
}

a {
    color: var(--medium-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

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

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md) 0;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    font-weight: 700;
    display: none !important; /* Hide the text logo when image is present */
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: var(--spacing-md);
    position: relative;
}

.nav-links a {
    color: var(--medium-dark);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    display: inline-block;
    line-height: 1.5;
    vertical-align: middle;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-medium);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--secondary-color);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    height: 100%;
    vertical-align: middle;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform var(--transition-fast);
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-md);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-medium);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show dropdown menu when active class is applied (for mobile) */
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--medium-dark);
    font-weight: 400;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-menu a:hover {
    background-color: rgba(88, 165, 178, 0.1);
    color: var(--secondary-color);
}

.dropdown-menu a::after {
    display: none;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ===== Hero Section ===== */
.hero {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 80vh; /* Prevent it from being too tall on wide screens */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://precisionfinishca.com/images/Project Gallery Header - crew painting a 2 story home.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
    position: relative;
}

/* Ensure hero sections have a dark overlay for better text visibility */
.hero[style*="background-image"]:not([style*="linear-gradient"]) {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), var(--bg-image, url('https://precisionfinishca.com/css/styles.css'));
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 800px;
    position: absolute;
    top: 50%;  /* Center content vertically */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 var(--spacing-md);
}

.hero h1, .header-title {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    color: var(--light);
    margin-bottom: var(--spacing-lg);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ===== Services Overview Section ===== */
.services-overview {
    padding: var(--spacing-xl) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    text-align: center;
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    margin-bottom: var(--spacing-md);
}

.learn-more {
    font-weight: 600;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.learn-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform var(--transition-fast);
}

.learn-more:hover::after {
    transform: translateX(5px);
}

/* ===== Why Choose Us Section ===== */
.why-choose-us {
    padding: var(--spacing-xl) 0;
    background-color: var(--light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.benefit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-medium);
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    width: 70px;
    height: 70px;
    background-color: rgba(88, 165, 178, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Featured Projects Section ===== */
.featured-projects {
    padding: var(--spacing-xl) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-medium);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--white);
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--medium-light);
    margin-bottom: 0;
}

.view-all-projects {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* ===== Testimonials Section ===== */
.testimonials {
    padding: var(--spacing-xl) 0;
    background-color: var(--light);
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 0 var(--spacing-sm);
}

.testimonial-content {
    font-style: italic;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding: 0 var(--spacing-sm);
}

.testimonial-content::before,
.testimonial-content::after {
    content: '"';
    font-size: 3rem;
    color: rgba(88, 165, 178, 0.2);
    position: absolute;
    line-height: 1;
}

.testimonial-content::before {
    top: -20px;
    left: -10px;
}

.testimonial-content::after {
    bottom: -40px;
    right: -10px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: var(--spacing-sm);
    border: 3px solid var(--secondary-color);
}

.author-info h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.author-info p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--medium-light);
}

.rating {
    color: #ffc107;
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-md);
    gap: var(--spacing-sm);
}

.testimonial-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--medium-light);
    color: var(--medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-controls button:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--spacing-xl) 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://precisionfinishca.com/images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--white);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

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

.cta-content p {
    color: var(--light);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
}

.cta-content p a {
    color: var(--white) !important;
    text-decoration: none;
}

.cta-content p a:hover {
    color: var(--secondary-color) !important;
}

/* ===== Footer ===== */
footer {
    background-color: var(--primary-color);
    color: var(--light);
    padding-top: var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
}

.footer-logo h2 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-logo p {
    color: var(--medium-light);
    font-size: 0.9rem;
}

.footer-links h3,
.footer-services h3,
.footer-contact h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer-links h3::after,
.footer-services h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul li,
.footer-services ul li,
.footer-contact ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a,
.footer-services a {
    color: var(--medium-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-services a:hover {
    color: var(--secondary-color);
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    color: var(--medium-light);
}

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

.footer-contact ul li a {
    color: var(--medium-light);
    transition: color var(--transition-fast);
}

.footer-contact ul li a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: var(--spacing-sm);
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--medium-light);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-bottom a {
    color: var(--medium-light);
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1, .header-title {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: var(--spacing-sm) 0;
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: var(--spacing-xs) var(--spacing-md);
        width: 100%;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Mobile dropdown styles */
    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        padding-left: var(--spacing-md);
        transform: none;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        /* Make dropdown menus visible by default on mobile */
        opacity: 1;
        visibility: visible;
        display: block;
        background-color: rgba(245, 245, 245, 0.5);
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    .dropdown.active > a {
        color: var(--secondary-color);
    }
    
    /* Additional styling for mobile dropdown menu items */
    .dropdown-menu li a {
        padding-left: calc(var(--spacing-md) + 10px);
        font-size: 0.95rem;
        border-left: 3px solid var(--light);
    }
    
    .dropdown-menu li a:hover {
        border-left: 3px solid var(--secondary-color);
    }
    
    .hero h1, .header-title {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .container {
        width: 95%;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero h1, .header-title {
        font-size: 1.8rem;
        white-space: normal !important;
    }
    
    .services-grid,
    .benefits-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--spacing-md) !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: var(--spacing-xs);
    }
}
/* Fix for links in dark backgrounds */
.hero a, .hero p a, .service-hero a, .service-hero p a, .header-image a, .header-image p a, .area-image a, .area-card a {
    color: var(--white) !important;
    text-decoration: none;
}

.hero a:hover, .hero p a:hover, .service-hero a:hover, .service-hero p a:hover, .header-image a:hover, .header-image p a:hover, .area-image a:hover, .area-card a:hover {
    color: var(--secondary-color) !important;
    text-decoration: none;
}
/* Fix for footer links to match the font color of other content */
footer a {
    color: var(--medium-light) !important;
}

footer a:hover {
    color: var(--secondary-color) !important;
}

.footer-links a,
.footer-services a,
.footer-contact a {
    color: var(--medium-light) !important;
}

.footer-links a:hover,
.footer-services a:hover,
.footer-contact a:hover {
    color: var(--secondary-color) !important;
}

.footer-bottom a {
    color: var(--medium-light) !important;
}

.footer-bottom a:hover {
    color: var(--secondary-color) !important;
}