/* ============================================
   ROOFIN - Roofing Services Company Template
   Professional HTML5 Template
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2a4a73;
    --secondary-color: #f7941d;
    --secondary-hover: #e8850a;
    --accent-color: #ffc107;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Preloader
   ============================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 12px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 30px;
}

.top-bar-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-info i {
    color: var(--secondary-color);
}

.top-bar-social {
    display: flex;
    gap: 15px;
}

.top-bar-social a {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.top-bar-social a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--text-light);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-light);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

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

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

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

.nav-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.phone-btn i {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.quote-btn {
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--text-light);
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.quote-btn:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(30, 58, 95, 0.85), rgba(30, 58, 95, 0.9)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    max-width: 700px;
    color: var(--text-light);
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 20px;
    background: var(--secondary-color);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 60px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
}

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

.hero-desc {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 35px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--secondary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

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

/* ============================================
   Features Bar
   ============================================ */
.features-bar {
    background: var(--secondary-color);
    padding: 40px 0;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.features-bar .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
}

.feature-item i {
    font-size: 40px;
}

.feature-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   Section Styles
   ============================================ */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(247, 148, 29, 0.1);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.section-desc {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--secondary-color);
    border-radius: 10px;
    z-index: -1;
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: -20px;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 25px 30px;
    border-radius: 10px;
    text-align: center;
}

.experience-badge h3 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.experience-badge p {
    font-size: 14px;
    margin-top: 5px;
}

.about-text h3 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-feature i {
    color: var(--secondary-color);
    font-size: 18px;
}

/* ============================================
   Services Section
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--text-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

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

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

.service-icon {
    position: absolute;
    bottom: -25px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.service-content {
    padding: 40px 25px 25px;
}

.service-content h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    gap: 12px;
}

/* ============================================
   Why Choose Us Section
   ============================================ */
.why-choose {
    background: var(--primary-color);
    color: var(--text-light);
}

.why-choose .section-title {
    color: var(--text-light);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-choose-item {
    text-align: center;
    padding: 40px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.why-choose-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.why-choose-item i {
    font-size: 50px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.why-choose-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.why-choose-item p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.7;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-section {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.95), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-category {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.project-title {
    color: var(--text-light);
    font-size: 22px;
    font-weight: 600;
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--text-light);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    color: var(--secondary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-rating {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 25px;
}

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

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 14px;
    color: var(--text-gray);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(rgba(30, 58, 95, 0.9), rgba(30, 58, 95, 0.9)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-light);
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 35px;
}

/* ============================================
   Blog Section
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--text-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
}

.blog-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

.blog-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
}

.blog-date h4 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.blog-date span {
    font-size: 12px;
    text-transform: uppercase;
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-gray);
}

.blog-meta i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.blog-content h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-content h3:hover {
    color: var(--secondary-color);
}

.blog-content p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: var(--text-light);
}

.footer-top {
    padding: 80px 0 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-about .logo {
    margin-bottom: 25px;
}

.footer-about .logo-text {
    color: var(--text-light);
}

.footer-about p {
    font-size: 15px;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

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

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

.footer-links h4 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    opacity: 0.8;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links ul li a::before {
    content: '›';
    color: var(--secondary-color);
    font-size: 20px;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 15px;
}

.footer-contact i {
    color: var(--secondary-color);
    font-size: 18px;
    margin-top: 3px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ============================================
   Scroll to Top
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary-hover);
    transform: translateY(-5px);
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .features-bar .container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 45px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image::before {
        display: none;
    }
    
    .experience-badge {
        right: 20px;
    }
    
    .services-grid,
    .projects-grid,
    .testimonials-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--text-light);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transform: translateX(-100%);
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-cta {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .hero {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .features-bar .container {
        grid-template-columns: 1fr;
    }
    
    .features-bar {
        margin-top: 0;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .services-grid,
    .projects-grid,
    .testimonials-grid,
    .blog-grid,
    .why-choose-grid {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .experience-badge {
        padding: 15px 20px;
    }
    
    .experience-badge h3 {
        font-size: 36px;
    }
}
