/*
 * Roofing Pro — Elementor Widgets CSS
 * Exact design from original HTML/CSS source
 */

/* ================================================================
   HERO SECTION WIDGET
   ================================================================ */

.rp-hero-section {
    position: relative;
    height: 750px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.rp-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.rp-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}

.rp-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(0,0,0,0.4);
}

.rp-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.rp-hero-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.rp-hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rp-hero-right {
    flex: 0 0 500px;
    max-width: 500px;
}

.rp-hero-title {
    font-weight: 900;
    font-size: 48px;
    line-height: 1.15;
    color: #fff;
    text-shadow: 2px 2px 8px #000;
    margin-bottom: 15px;
    font-family: var(--rp-font-heading);
}

.rp-hero-desc {
    font-size: 22px;
    color: #fff;
    text-shadow: 2px 2px 8px #000;
    font-weight: 400;
    margin-bottom: 25px;
}

/* Icon boxes */
.rp-hero-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rp-hero-icon-item {
    background: rgba(242, 4, 4, 0.63);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 120px;
    width: 180px;
    border-radius: 24px;
    padding: 10px;
    text-align: center;
    box-shadow: 1px -3px 5px rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.rp-hero-icon-svg {
    color: #fff;
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 8px;
}

.rp-hero-icon-svg svg,
.rp-hero-icon-svg i {
    width: 1em;
    height: 1em;
    font-size: 3.5rem;
    color: #fff;
    fill: #fff;
}

.rp-hero-icon-text p {
    color: #fff;
    font-family: var(--rp-font-heading);
    line-height: 1.2;
    margin: 0;
    font-size: 1rem;
}

/* Form box */
.rp-hero-form-wrap {
    
    border-radius: 4px;
    padding:0px;
    margin-top:150px;
}

.rp-hero-form-title {
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-align: center;
    padding-top: 5px;
    margin-bottom: 5px;
    font-family: var(--rp-font-heading);
}

.rp-hero-form-sub {
    text-align: center;
    color: #fff;
    line-height: 1;
    margin-bottom: 15px;
}

.rp-hero-form-body label { color: #fff !important; }

.rp-hide-mobile { }

/* ================================================================
   VIDEO + CONTENT WIDGET
   ================================================================ */

.rp-vc-section {
    padding: 75px 0 45px;
}

.rp-vc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.rp-vc-reverse { direction: rtl; }
.rp-vc-reverse > * { direction: ltr; }

.rp-vc-embed-wrap { border-radius: 4px; overflow: hidden; }

.rp-vc-subtitle {
    font-size: 1.8rem;
    font-family: var(--rp-font-heading);
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.rp-vc-title {
    font-size: 40px;
    font-weight: 400;
    line-height: 1.1;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: var(--rp-font-heading);
}

.rp-vc-desc {
    font-size: 1rem;
    color: #373741;
    line-height: 1.7;
    margin-bottom: 15px;
}

.rp-vc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 35px;
    background: #f20404;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: background 0.3s;
    margin-top: 15px;
}

.rp-vc-btn:hover {
    background: #c00000;
    color: #fff;
    text-decoration: none;
}

/* ================================================================
   CALL TO ACTION WIDGET
   ================================================================ */

.rp-cta-section {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.rp-cta-parallax {
    background-attachment: fixed;
}

.rp-cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rp-cta-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 60px 0;
}

.rp-cta-title {
    font-size: 4rem;
    font-weight: bold;
    font-family: var(--rp-font-heading);
    color: #fff !important;
    text-shadow: 2px 2px 4px #000;
    line-height: 1.1;
    margin-bottom: 20px;
}

.rp-cta-subtitle {
    font-size: 2rem;
    color: #fff !important;
    text-shadow: 2px 2px 4px #000;
    margin-bottom: 15px;
}

.rp-cta-btn {
    font-size: 3rem;
    font-weight: 900;
    -webkit-text-stroke: 1px rgba(255,255,255,0.8);
    -webkit-text-fill-color: #f20404;
    background: transparent;
    border: 1px solid #fff;
    padding: 10px 30px;
    display: inline-block;
    border-radius: 40px;
    margin-top: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.rp-cta-btn:hover {
    background: rgba(255,255,255,0.1);
    -webkit-text-fill-color: #fff;
    text-decoration: none;
}

/* ================================================================
   ROOFING SERVICES WIDGET
   ================================================================ */

.rp-services-section {
    padding: 75px 0 45px;
}

.rp-services-header {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.rp-services-section-title {
    font-size: 4rem;
    font-weight: bold;
    font-family: var(--rp-font-heading);
    color: #fff;
    margin-bottom: 10px;
}

.rp-services-section-desc {
    font-size: 1.1rem;
    color: #fff;
    max-width: 700px;
    margin: 0 auto;
}

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

/* Service Card */
.rp-service-card {
    background: #fff;
    text-align: center;
    border-radius: 5px;
    padding-bottom: 30px;
    min-height: 580px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.5s;
    display: flex;
    flex-direction: column;
}

.rp-service-card:hover {
    box-shadow: 2px -1px 5px rgba(255,255,255,0.3) !important;
}

/* Clip-path image container — exact from original CSS */
.rp-service-img-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 290px;
    overflow: hidden;
    position: relative;
    clip-path: polygon(100% 0, 100% 90%, 50% 100%, 0 90%, 0 0);
    background: #f20404;
    transition: all 0.5s;
    flex-shrink: 0;
}

.rp-service-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 280px;
    max-width: none;
    position: absolute;
    object-fit: cover;
    clip-path: polygon(100% 0, 100% 90%, 50% 100%, 0 90%, 0 0);
    transition: all 0.5s;
}

/* Hover effects — exact from original */
.rp-service-card:hover .rp-service-img-container {
    background: #000;
    height: 305px;
}

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

.rp-service-title {
    font-family: var(--rp-font-heading);
    font-size: 1.4rem;
    color: #1a1a1a;
    padding: 25px 15px 10px;
    margin: 0;
}

.rp-service-desc {
    font-size: 1rem;
    color: #666;
    padding: 0 15px;
    flex: 1;
    line-height: 1.6;
}

.rp-service-link {
    font-size: 1.1rem;
    font-family: var(--rp-font-heading);
    color: #f20404;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 15px;
    margin-top: auto;
    transition: gap 0.2s;
}

.rp-service-link:hover {
    color: #c00000;
    gap: 10px;
    text-decoration: none;
}

.rp-service-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd 25%, #eee 50%, #ddd 75%);
}

/* ================================================================
   IMAGE + CONTENT WIDGET
   ================================================================ */

.rp-ic-section {
    padding: 75px 0 45px;
}

.rp-ic-grid {
    display: flex;
    align-items: center;
    gap: 30px;
}

.rp-ic-reverse {
    flex-direction: row-reverse;
}

.rp-ic-image-col {
    flex: 0 0 35%;
}

.rp-ic-text-col {
    flex: 1;
}

.rp-ic-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.rp-ic-title {
    font-size: 60px;
    font-weight: 700;
    font-family: var(--rp-font-heading);
    color: #f20404;
    margin-bottom: 0;
    line-height: 1.1;
}

.rp-ic-desc {
    font-size: 1.3rem;
    color: #202020;
    margin-top: 25px;
    line-height: 1.6;
}

.rp-ic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    padding: 20px;
    background: #f20404;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    margin-top: 40px;
    transition: background 0.3s;
}

.rp-ic-btn:hover {
    background: #c00000;
    color: #fff;
    text-decoration: none;
}

/* ================================================================
   GALLERY / PROJECTS WIDGET
   ================================================================ */

.rp-gallery-section {
    width: 100%;
    padding-bottom: 50px;
    background: #f5f4f4;
}

.rp-gallery-title {
    font-size: 4rem;
    font-family: var(--rp-font-heading);
    color: #333;
    font-weight: 600;
}

.rp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    width: 100%;
}

.rp-gallery-item {
    position: relative;
    overflow: hidden;
    height: 370px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Corner-to-corner splash animation — EXACT from original CSS */
.rp-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition-property: transform, opacity;
    transition-duration: 0.4s;
    transition-timing-function: ease;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, .13);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .13) 48%,
        rgba(255, 255, 255, .5) 57%,
        rgba(255, 255, 255, 0) 64%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.rp-gallery-item:hover::after {
    opacity: 1;
    transform: translate(0, 0);
}

.rp-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    max-width: none;
}

.rp-gallery-item:hover .rp-gallery-img {
    transform: scale(1.03);
}

/* Lightbox */
.rp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.rp-lightbox.rp-lightbox-open {
    display: flex;
}

.rp-lightbox-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.rp-lightbox-close,
.rp-lightbox-prev,
.rp-lightbox-next {
    position: absolute;
    background: none;
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 12px 18px;
    line-height: 1;
    transition: background 0.2s;
    z-index: 2;
}

.rp-lightbox-close {
    top: 20px;
    right: 30px;
    border-radius: 4px;
}

.rp-lightbox-prev { left: 20px; }
.rp-lightbox-next { right: 20px; }

.rp-lightbox-close:hover,
.rp-lightbox-prev:hover,
.rp-lightbox-next:hover {
    background: rgba(255,255,255,0.15);
}

/* ================================================================
   TESTIMONIALS WIDGET
   ================================================================ */

.rp-testimonials-section {
    padding: 60px 0;
    background: #f8f8f8;
}

.rp-testimonials-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 15px;
    box-shadow: 4px 5px 10px 2px rgba(0,0,0,0.05);
    background: #fff;
}

.rp-testimonials-title {
    font-size: 1.8rem;
    font-family: var(--rp-font-heading);
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.rp-testimonials-subtitle {
    font-size: 1.05rem;
    color: #555;
}

.rp-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.rp-review-card {
    background: #fff;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.rp-review-blockquote {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
    padding: 0 0 20px 30px;
    position: relative;
    border: none;
    margin: 0;
}

.rp-review-blockquote::before {
    content: '\201C';
    font-size: 4rem;
    color: #f20404;
    position: absolute;
    left: -5px;
    top: -15px;
    font-family: Georgia, serif;
    line-height: 1;
}

.rp-reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rp-reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.rp-reviewer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.rp-reviewer-initial {
    background: var(--rp-primary, #f20404);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.rp-reviewer-name {
    font-size: 0.95rem;
    color: #222;
    display: block;
}

.rp-review-stars { display: flex; gap: 1px; margin-top: 3px; }

.rp-star { color: #f5a623; font-size: 1rem; }
.rp-star-empty { color: #ddd; }

.rp-review-source {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.rp-testimonials-cta-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #f20404;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rp-testimonials-cta-btn:hover {
    background: #c00000;
    color: #fff;
    text-decoration: none;
}

/* ================================================================
   BLOG POSTS WIDGET
   ================================================================ */

.rp-blog-section {
    padding: 60px 0;
    background: #f5f4f4;
}

.rp-blog-header {
    text-align: center;
    margin-bottom: 35px;
}

.rp-blog-section-title {
    font-size: 2.2rem;
    font-family: var(--rp-font-heading);
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
}

.rp-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.rp-blog-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rp-blog-card-img {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.rp-blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rp-blog-card:hover .rp-blog-card-img img {
    transform: scale(1.05);
}

.rp-blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rp-blog-card-meta {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-bottom: 8px;
}

.rp-blog-card-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.4;
}

.rp-blog-card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}

.rp-blog-card-title a:hover { color: #f20404; }

.rp-blog-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    flex: 1;
    margin-bottom: 15px;
}

.rp-blog-read-more {
    display: inline-block;
    padding: 8px 18px;
    background: #f30000;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    align-self: flex-start;
    transition: background 0.3s;
}

.rp-blog-read-more:hover { background: #c00000; }

.rp-blog-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #f30000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
    text-transform: uppercase;
}

.rp-blog-view-all:hover {
    background: #c00000;
    color: #fff;
    text-decoration: none;
}

/* ================================================================
   GOOGLE MAP WIDGET
   ================================================================ */

.rp-map-wrapper {
    width: 100%;
    overflow: hidden;
}

.rp-map-iframe {
    width: 100%;
    height: 350px;
    border: 0;
    display: block;
}

/* ================================================================
   SHARED / UTILITY
   ================================================================ */

/* Section spacing */
.rp-section-pt { padding-top: 75px; }
.rp-section-pb { padding-bottom: 45px; }

/* Post card (archive) */
.rp-blog-archive .rp-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.rp-post-card {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.rp-post-card-img { overflow: hidden; }
.rp-post-card-img img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.5s; }
.rp-post-card:hover .rp-post-card-img img { transform: scale(1.05); }

.rp-post-card-body { padding: 20px; }
.rp-post-card-meta { font-size: 0.8rem; color: #888; margin-bottom: 8px; }
.rp-post-card-title { font-size: 1.1rem; margin-bottom: 10px; }
.rp-post-card-title a { color: #222; }
.rp-post-card-title a:hover { color: var(--rp-primary); }
.rp-post-card-excerpt { font-size: 0.9rem; color: #555; }
.rp-read-more { color: var(--rp-primary); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; }

/* Single post */
.rp-single-layout { display: flex; gap: 40px; }
.rp-single-content { flex: 1; min-width: 0; }
.rp-sidebar { flex: 0 0 280px; }
.rp-article-thumb { margin-bottom: 25px; border-radius: 4px; overflow: hidden; }
.rp-article-thumb img { width: 100%; height: 400px; object-fit: cover; }
.rp-article-meta { font-size: 0.85rem; color: #888; margin-bottom: 20px; display: flex; gap: 15px; }
.rp-article-body { font-size: 1.05rem; line-height: 1.8; }
.rp-article-body h2, .rp-article-body h3 { margin-top: 30px; }

/* Preloader */
.rp-preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.rp-preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #eee;
    border-top-color: var(--rp-primary, #f20404);
    border-radius: 50%;
    animation: rp-spin 0.8s linear infinite;
}

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

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1200px) {
    .rp-services-grid { grid-template-columns: repeat(2, 1fr); }
    .rp-reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .rp-hero-inner { flex-direction: column; text-align: center; }
    .rp-hero-right { max-width: 100%; width: 100%; }
    .rp-hero-title { font-size: 36px; }
    .rp-hero-desc { font-size: 18px; }
    .rp-hero-icons { justify-content: center; }

    .rp-vc-grid { grid-template-columns: 1fr; }
    .rp-ic-grid { flex-direction: column; }
    .rp-ic-reverse { flex-direction: column; }
    .rp-ic-image-col, .rp-ic-text-col { flex: none; width: 100%; }

    .rp-blog-grid { grid-template-columns: 1fr; }
    .rp-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .rp-reviews-grid { grid-template-columns: 1fr; }
    .rp-services-grid { grid-template-columns: repeat(2, 1fr); }

    .rp-single-layout { flex-direction: column; }
    .rp-sidebar { flex: none; width: 100%; }
}

@media (max-width: 767px) {
    .rp-hero-section { height: 500px; }
    .rp-hide-mobile { display: none !important; }
    .rp-hero-icon-item { height: 100px; width: 140px; }
    .rp-hero-icons { gap: 10px; padding: 0 10px; }

    .rp-cta-title { font-size: 2.5rem; }
    .rp-cta-btn { font-size: 2rem; }

    .rp-services-grid { grid-template-columns: 1fr; }
    .rp-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .rp-gallery-item { height: 170px; }

    .rp-testimonials-header { max-width: 100%; }
    .rp-ic-title { font-size: 40px; }

    .rp-blog-archive .rp-blog-grid { grid-template-columns: 1fr; }
    .rp-vc-section { padding: 50px 0 30px; }
}

@media (max-width: 420px) {
    .rp-hero-section { height: 400px; }
    .rp-gallery-grid { grid-template-columns: 1fr; }
}
