/* ============================================
   Polar Insulation - Custom Styles
   ============================================ */

:root {
    --primary: #1a3a6b;
    --primary-dark: #0f2548;
    --accent: #e63946;
    --accent-hover: #c62d39;
    --light-bg: #f4f7fb;
    --text-dark: #2b2b2b;
    --text-muted: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ---- Global ---- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

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

img {
    max-width: 100%;
}

.section-padding {
    padding: 80px 0;
}

.section-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.section-subtitle.text-white {
    color: rgba(255, 255, 255, 0.7);
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.bg-dark .section-title {
    color: var(--white);
}

.section-desc {
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* ---- Top Bar ---- */
.top-bar {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
}

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

.top-phone {
    font-weight: 600;
}

/* ---- Navigation ---- */
#mainNav {
    background-color: var(--primary);
    padding: 10px 0;
    transition: var(--transition);
    z-index: 1050;
}

#mainNav.scrolled {
    background-color: var(--primary-dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    padding: 5px 0;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--white) !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 15px;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Override the underline animation for the dropdown toggle (Bootstrap uses ::after for the caret) */
.navbar-nav .dropdown-toggle::after {
    position: static;
    background: none;
    transform: none;
    height: auto;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    vertical-align: 0.2em;
    margin-left: 0.3em;
}

/* ---- Services Dropdown ---- */
.navbar .dropdown-menu {
    background-color: var(--white);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    margin-top: 8px;
    min-width: 220px;
}

.navbar .dropdown-menu .dropdown-item {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-dark);
    padding: 10px 20px;
    transition: var(--transition);
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: var(--light-bg);
    color: var(--accent);
    padding-left: 24px;
}

.btn-cta-nav {
    background-color: var(--accent);
    color: var(--white) !important;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px;
    letter-spacing: 0.5px;
}

.btn-cta-nav:hover {
    background-color: var(--accent-hover);
    color: var(--white) !important;
    transform: scale(1.05);
}

.btn-cta-mobile {
    background-color: var(--accent);
    color: var(--white) !important;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 16px;
}

.btn-cta-mobile:hover {
    background-color: var(--accent-hover);
    color: var(--white) !important;
}

/* ---- Hero Carousel ---- */
.hero-slide {
    height: 85vh;
    min-height: 500px;
    max-height: 800px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 37, 72, 0.85) 0%, rgba(26, 58, 107, 0.65) 50%, rgba(15, 37, 72, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-logo {
    max-height: 120px;
    width: auto;
    filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4));
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.95;
}

.btn-cta-hero {
    background-color: var(--accent);
    color: var(--white) !important;
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 14px 32px;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.btn-cta-hero:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.4);
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
}

/* ---- CTA Buttons (General) ---- */
.btn-cta {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 12px 30px;
    font-size: 0.95rem;
}

.btn-cta:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

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

.about-feature i {
    font-size: 1.4rem;
    color: var(--accent);
}

.about-feature span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---- Service Cards ---- */
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 35px 30px;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--accent);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.service-card h4 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.service-link {
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}

.service-link:hover {
    color: var(--accent-hover);
}

/* ---- CTA Banner ---- */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    color: var(--white);
}

.cta-banner h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ---- Service Area ---- */
.area-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area-list li {
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
}

.area-list li i {
    color: var(--accent);
    margin-right: 8px;
}

.service-area-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ---- Affiliations ---- */
.affiliation-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.affiliation-logo {
    height: 65px;
    width: auto;
    margin-bottom: 15px;
    object-fit: contain;
}

.affiliation-card p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* ---- Why Choose Us ---- */
.why-card {
    padding: 30px 20px;
}

.why-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.why-card:hover .why-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.why-icon i {
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.why-card:hover .why-icon i {
    color: var(--white);
}

.why-card h5 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.why-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
}

/* ---- Testimonials ---- */
.testimonials-rating-summary .stars-display {
    font-size: 1.5rem;
    color: #f4b400;
    margin-bottom: 8px;
}

.testimonials-rating-summary .stars-display i {
    margin: 0 2px;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    height: 100%;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.1;
    line-height: 1;
}

.testimonial-stars {
    color: #f4b400;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.testimonial-stars i {
    margin-right: 2px;
}

.testimonial-text {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
    flex-grow: 1;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.testimonial-author > i {
    font-size: 2.2rem;
    color: var(--primary);
}

.testimonial-author h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin: 0;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 35px;
}

.testimonial-controls .carousel-indicators {
    margin: 0;
}

.testimonial-controls .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.3;
    border: none;
    margin: 0 5px;
}

.testimonial-controls .carousel-indicators button.active {
    opacity: 1;
    background-color: var(--accent);
}

.btn-testimonial-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

.btn-testimonial-nav:hover {
    background: var(--primary);
    color: var(--white);
}

/* ---- Contact Section ---- */
#contact {
    background-color: var(--primary-dark);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 3px;
}

.contact-item h6 {
    margin-bottom: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.8);
}

.contact-item a:hover {
    color: var(--white);
}

.contact-item p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.contact-cta-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 40px 30px;
    backdrop-filter: blur(10px);
}

/* ---- Footer ---- */
.footer {
    background-color: #0a1a33;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-logo {
    max-height: 120px;
}

.footer h5 {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.93rem;
}

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

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0 20px;
}

.footer p {
    font-size: 0.88rem;
}

/* ---- Mobile Sticky CTA ---- */
.mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 10px 15px;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-cta .btn {
    border-radius: 50px;
    font-size: 1rem;
    padding: 12px;
}

/* ---- Back to Top ---- */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* ---- Inner Page Header ---- */
.page-header {
    position: relative;
    padding: 70px 0 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 37, 72, 0.92) 0%, rgba(26, 58, 107, 0.85) 100%);
}

.page-header .container {
    z-index: 2;
}

.page-breadcrumb {
    margin-bottom: 15px;
}

.page-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--white);
}

.page-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

.page-header-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.page-header-desc {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0;
}

/* ---- Inner Page Content ---- */
.page-content h2 {
    margin-bottom: 20px;
}

.page-content h3 {
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.page-content p {
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 18px;
}

/* ---- Sidebar ---- */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 30px;
}

.sidebar-cta h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.sidebar-cta p {
    font-size: 0.93rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.sidebar-cta .btn-outline-primary {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.sidebar-cta .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--white);
    color: var(--white);
}

.sidebar-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.sidebar-box h5 {
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list li span:first-child {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-dark);
}

.sidebar-list li span:last-child {
    color: var(--text-muted);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #eee;
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-nav li a i {
    color: var(--accent);
    font-size: 0.75rem;
    transition: var(--transition);
}

.sidebar-nav li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 991.98px) {
    .hero-slide {
        height: 70vh;
        min-height: 450px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content .lead {
        font-size: 1.05rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .hero-buttons .btn {
        font-size: 0.95rem;
        padding: 12px 24px;
    }

    .hero-buttons .me-3 {
        margin-right: 0 !important;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .navbar-collapse {
        background: var(--primary-dark);
        margin: 10px -12px -10px;
        padding: 15px 20px;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .navbar .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.08);
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0 0 0 15px;
    }

    .navbar .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.82rem;
        padding: 8px 15px;
    }

    .navbar .dropdown-menu .dropdown-item:hover,
    .navbar .dropdown-menu .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.08);
        color: var(--white);
    }

    .page-header {
        padding: 50px 0 40px;
    }

    .page-header-title {
        font-size: 2rem;
    }

    .footer {
        padding-bottom: 80px;
    }

    .back-to-top {
        bottom: 75px;
    }
}

@media (max-width: 767.98px) {
    .hero-slide {
        height: 65vh;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content .lead {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .cta-banner h2 {
        font-size: 1.5rem;
    }

    .cta-banner .lead {
        font-size: 1rem;
    }

    .service-card {
        padding: 25px 20px;
    }

    .affiliation-logo {
        max-height: 50px;
    }

    .contact-cta-box {
        padding: 30px 20px;
    }

    #serviceAreaMap {
        height: 300px !important;
    }

    .page-header-title {
        font-size: 1.7rem;
    }

    .page-header-desc {
        font-size: 0.95rem;
    }
}

@media (max-width: 575.98px) {
    .hero-slide {
        height: 60vh;
        min-height: 380px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .btn-cta-hero {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .affiliation-card {
        padding: 20px 15px;
    }

    .affiliation-card p {
        font-size: 0.72rem;
    }

    .page-header {
        padding: 40px 0 35px;
    }

    .page-header-title {
        font-size: 1.5rem;
    }
}

/* ---- Animations ---- */
.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);
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
