@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
    /* Brand Colors (Aligned with New Logo) */
    --primary-color: #d32f2f;
    --primary-dark: #b71c1c;
    --secondary-color: #0F172A;
    /* Professional Navy base from UI skill */
    --accent-color: #f7d519;

    /* UI Palette - Optimized for Scanability */
    --text-main: #1e293b;
    --text-muted: #475569;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --border-ui: #e2e8f0;

    /* Swiss Style Spacing & Layout */
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Interactive States & Effects */
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.625;
    background-color: var(--bg-main);
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--secondary-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Header & Nav - Optimized Silhouette */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-ui);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section - Balanced Contrast */
.hero {
    position: relative;
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)),
        url('https://roofingmvp.com/wp-content/uploads/2021/10/guyroofing.com-residential.jpg');
    background-size: cover;
    background-position: center;
    color: var(--bg-main);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons - Minimalist & Interactive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Sections */
section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer - Clean Grid */
footer {
    background-color: var(--secondary-color);
    color: var(--bg-alt);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.footer-info h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--white);
    font-size: 1.5rem;
}

.footer-info p {
    color: var(--text-muted);
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: slideUp 0.6s cubic-bezier(0, 0, 0.2, 1) forwards;
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Service Card Hover Effects - Enhanced */
.service-card {
    background: var(--bg-main);
    border: 1px solid var(--border-ui);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: default;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Button Pulse Effect */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    /* Switching to white for better contrast with animations */
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

/* Slider / Carousel System */
.testimonial-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--spacing-md) 0;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    gap: var(--spacing-md);
}

.testimonial-slide {
    min-width: 100%;
    opacity: 0.3;
    scale: 0.95;
    transition: all 0.5s ease;
}

.testimonial-slide.active {
    opacity: 1;
    scale: 1;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-ui);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 10px;
}

.slider-btn {
    background: none;
    border: 1px solid var(--border-ui);
    color: var(--secondary-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    header .container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    nav ul {
        gap: var(--spacing-sm);
        flex-wrap: wrap;
        justify-content: center;
    }
}