/* Custom CSS for Sai Ram Plastics */

:root {
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Raleway", sans-serif;
    --nav-font: "Poppins", sans-serif;
}

:root {
    --background-color: #E3F2FD;
    --default-color: #010608;
    --heading-color: #011e2c;
    --accent-color: #04415f;
    --surface-color: #ffffff;
    --contrast-color: #ffffff;
}

:root {
    --nav-color: #04415f;
    --nav-hover-color: #2086b8;
    --nav-mobile-background-color: #ffffff;
    --nav-dropdown-background-color: #ffffff;
    --nav-dropdown-color: #010608;
    --nav-dropdown-hover-color: #04415f;
}

:root {
    scroll-behavior: smooth;
}

:root {
    --surface-color-rgb: 255, 255, 255;
    --accent-color-rgb: 4, 65, 95; /* Defined here for use with rgba */
}

body {
    color: var(--default-color);
    background-color: var(--background-color);
    font-family: var(--default-font);
    line-height: 1.6;
    padding-top: 80px;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: color-mix(in srgb, var(--accent-color), transparent 25%);
    /* Removed text-decoration: underline; */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    font-family: var(--heading-font);
    font-weight: 700;
}

.php-email-form .error-message {
    display: none;
    background: #df1529;
    color: #ffffff;
    text-align: left;
    padding: 15px;
    margin-bottom: 24px;
    font-weight: 600;
    border-radius: 8px;
}

.php-email-form .sent-message {
    display: none;
    color: #ffffff;
    background: #28a745;
    text-align: center;
    padding: 15px;
    margin-bottom: 24px;
    font-weight: 600;
    border-radius: 8px;
}

.php-email-form .loading {
    display: none;
    background: var(--surface-color);
    text-align: center;
    padding: 15px;
    margin-bottom: 24px;
    border-radius: 8px;
}

.php-email-form .loading:before {
    content: "";
    display: inline-block;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 10px -6px 0;
    border: 3px solid var(--accent-color);
    border-top-color: var(--surface-color);
    animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/
.navbar {
    background-color: rgba(var(--surface-color-rgb), 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(var(--surface-color-rgb), 0.2);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1020;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--heading-color) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.navbar-nav .nav-link {
    color: var(--nav-color) !important;
    font-weight: 500;
    margin-right: 20px;
    transition: all 0.3s ease-in-out;
    font-family: var(--nav-font);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--nav-hover-color);
    transition: width 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--nav-hover-color) !important;
}

.scrolled .header {
    box-shadow: 0px 0 20px rgba(0, 0, 0, 0.2);
    background-color: rgba(var(--surface-color-rgb), 0.95) !important;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero-section {
    background: linear-gradient(to right, #BBDEFB, #90CAF9);
    color: var(--default-color);
    padding: 100px 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

.hero-section .lead {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: var(--default-color);
}

.hero-section .btn {
    background-color: var(--accent-color);
    color: var(--contrast-color);
    border: none;
    padding: 15px 40px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.hero-section .btn:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
    color: var(--contrast-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/*--------------------------------------------------------------
# Common Card Styling (for Featured Products, Services, etc.)
--------------------------------------------------------------*/
.card {
    background-color: rgba(var(--surface-color-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--surface-color-rgb), 0.15);
    border-radius: 5px; /* Changed to 5px */
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.18);
}

.card-img-top {
    height: 180px; /* Increased to 180px */
    object-fit: cover;
    border-top-left-radius: 5px; /* Changed to 5px */
    border-top-right-radius: 5px; /* Changed to 5px */
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading-color);
    line-height: 1;
}

.card-text {
    font-size: 0.95rem;
    color: var(--default-color);
}

.card .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    border-radius: 25px;
    padding: 6px 15px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.card .btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
    border-color: color-mix(in srgb, var(--accent-color), black 10%);
    transform: translateY(-2px);
}

/*--------------------------------------------------------------
# About Us Snippet
--------------------------------------------------------------*/
.about-snippet {
    background-color: var(--surface-color);
    padding-top: 80px;
    padding-bottom: 80px;
}

.about-snippet img {
    border-radius: 18px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.12);
}

.about-snippet h2 {
    color: var(--heading-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-snippet p {
    color: var(--default-color);
    margin-bottom: 1rem;
}

.about-snippet .btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
    border-radius: 25px;
    padding: 12px 30px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.about-snippet .btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: var(--contrast-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/*--------------------------------------------------------------
# Services Overview
--------------------------------------------------------------*/
.services-overview {
    background-color: var(--background-color);
    padding-top: 80px;
    padding-bottom: 80px;
}

.services-overview .card {
    background-color: rgba(var(--surface-color-rgb), 0.7);
}

.services-overview h2 {
    color: var(--heading-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.services-overview .card-title {
    color: var(--heading-color);
}

.services-overview .btn-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.services-overview .btn-link:hover {
    color: color-mix(in srgb, var(--accent-color), black 10%);
    text-decoration: underline;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
footer {
    background-color: var(--heading-color) !important;
    color: var(--contrast-color);
    padding: 40px 0;
    font-size: 0.95rem;
}

footer a {
    color: var(--contrast-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: color-mix(in srgb, var(--contrast-color), transparent 20%);
    /* Removed text-decoration: underline; */
}

/*--------------------------------------------------------------
# Search Bar
--------------------------------------------------------------*/
.input-group .form-control.rounded-pill {
    border-radius: 50px !important;
    border: 1px solid rgba(var(--accent-color-rgb), 0.5);
    padding: 0.75rem 1.25rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.input-group .form-control.rounded-pill:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--accent-color-rgb), 0.25);
}

.input-group .btn.rounded-pill {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    border-radius: 50px !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-group .btn.rounded-pill:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
    border-color: color-mix(in srgb, var(--accent-color), black 10%);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/*--------------------------------------------------------------
# Products Carousel (Swiper Specific)
--------------------------------------------------------------*/
.featured-products .swiper {
    width: 100%;
    height: auto; /* Adjust height based on content */
    padding-bottom: 30px; /* Space for pagination bullets */
}
.featured-products .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Make cards stretch to same height */
    height: auto; /* Allow slide height to adjust to card content */
}
.featured-products .swiper-slide .card {
    width: 100%; /* Ensure card takes full width of its slide */
}
.featured-products .swiper-pagination-bullet-active {
    background-color: #0d6efd; /* Bootstrap primary color */
}

/*--------------------------------------------------------------
# Gallery Section
--------------------------------------------------------------*/
.gallery-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.gallery-section .card {
    border-radius: 12px;
    overflow: hidden; /* Ensures image corners are rounded with card */
}

.gallery-section .card-img-top {
    height: 200px; /* Adjust as needed */
    object-fit: cover;
}

/*--------------------------------------------------------------
# Contact Us Section
--------------------------------------------------------------*/
.contact-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.contact-section .card {
    border-radius: 18px;
}

.contact-section h4 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-section p {
    margin-bottom: 0.5rem;
    color: var(--default-color);
}

.contact-section .social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.contact-section .social-links a:hover {
    color: color-mix(in srgb, var(--accent-color), black 20%);
}

.contact-section .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.contact-section .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--accent-color-rgb), 0.25);
}

.contact-section .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.contact-section .btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
    border-color: color-mix(in srgb, var(--accent-color), black 10%);
    transform: translateY(-2px);
}

.map-container {
    overflow: hidden;
    padding-bottom: 100%; /* Changed to 100% for a square aspect ratio */
    position: relative;
    height: 0;
    border-radius: 5px; /* Changed to 5px */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem; /* Added margin for spacing below the map */
}

.map-container iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border-radius: 5px; /* Apply border-radius to iframe as well */
}

/*--------------------------------------------------------------
# Responsive Adjustments
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        margin-right: 0;
        text-align: center;
        padding: 10px 0;
    }
    .navbar-nav .nav-item {
        width: 100%;
    }
    .hero-section h1 {
        font-size: 3rem;
    }
    .hero-section .lead {
        font-size: 1.1rem;
    }
    .hero-section .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .about-snippet .col-md-6.order-md-2 {
        order: 1;
    }
    .about-snippet .col-md-6.order-md-1 {
        order: 2;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section .lead {
        font-size: 0.9rem;
    }
}

/*--------------------------------------------------------------
# Get Quote Modal Form
--------------------------------------------------------------*/
.modal-dialog {
    max-width: 400px;
}

.modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
    background-color: var(--surface-color);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.2rem;
    background-color: var(--background-color);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.modal-title {
    color: var(--heading-color);
    font-weight: 700;
    font-size: 1.15rem;
}

.modal-body {
    padding: 1.2rem;
}

.modal-body .form-label {
    font-weight: 500;
    color: var(--default-color);
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

/* Decreased vertical padding for form controls in the modal */
.modal-body .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.9rem; /* Slightly reduced vertical padding for a more compact look */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-size: 0.9rem;
}

.modal-body .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--accent-color-rgb), 0.25);
}

.modal-body .form-text {
    font-size: 0.8rem;
    color: #6c757d;
}

.modal-body .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.modal-body .btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
    border-color: color-mix(in srgb, var(--accent-color), black 10%);
    transform: translateY(-2px);
}

.modal-body .alert {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.8rem;
    margin-top: 0.8rem;
}

.modal-body .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.modal-body .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Blur filter for Bootstrap modal backdrop */
.modal-backdrop.show {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* For Safari support */
}

/* Generic Message Modal Styling (from script.js helper function) */
#infoMessageModal .modal-content {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#infoMessageModal .modal-header {
    background-color: var(--background-color);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

#infoMessageModal .modal-title {
    color: var(--heading-color);
}

#infoMessageModal .modal-body {
    padding: 1.5rem;
}

#infoMessageModal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 0.9rem;
}

#infoMessageModal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/*--------------------------------------------------------------
# Floating WhatsApp and Call Buttons
--------------------------------------------------------------*/
.floating-buttons {
    position: fixed;
    bottom: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.whatsapp-btn {
    left: 20px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: fixed;
    bottom: 20px;
}

.call-btn {
    right: 20px;
    background-color: #04415f;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: fixed;
    bottom: 20px;
}

.whatsapp-btn:hover,
.call-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.whatsapp-btn:hover {
    background-color: #1DA851;
}

.call-btn:hover {
    background-color: color-mix(in srgb, var(--accent-color), black 10%);
}

/* Centering for screens up to 768px (e.g., 765px) */
@media (max-width: 768px) {
    .modal-dialog {
        margin-left: auto;
        margin-right: auto;
    }
}
