﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
}

/* =========================================
   SEO CONTENT
========================================= */

.seo-content {
    max-width: 95%;
    margin: 10px auto;
    padding: 10px 10px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

    .seo-content h1 {
        font-size: 28px;
        color: #1f2937;
        margin-bottom: 15px;
        border-left: 5px solid #2563eb;
        padding-left: 12px;
    }

    .seo-content h2 {
        font-size: 22px;
        color: #111827;
        margin-top: 10px;
        margin-bottom: 12px;
    }

    .seo-content p {
        font-size: 16px;
        line-height: 1.75;
        color: #374151;
        margin-bottom: 14px;
    }

.seo-highlight {
    color: #2563eb;
    font-weight: 600;
}

/* =========================================
   SERVICE CONTAINER
========================================= */

.service-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /*grid-template-columns: repeat(auto-fit, minmax(280px, max-content));
    gap: 10px;
    width: 100%;
    max-width: 98%;
    margin: 20px auto;
    padding: 0 20px;*/
   /* display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 312px));*/
    gap: 10px;
    width: 100%;
    max-width: 98%;
    margin: 20px auto;
    padding: 0 20px;
    align-items: start;
}

/* =========================================
   SERVICE CARD
========================================= */

/* CARD */
.service-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    will-change: transform;
    transform: translateZ(0);

    .service-card,
    .service-group,
    .service-item,
    .service {
        overflow: hidden;
        word-wrap: break-word;
    }
}

    .service-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    }

/* =========================================
   IMAGE SECTION
========================================= */

.service-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f3f3f3;
    flex-shrink: 0;
}

/* =========================================
   SERVICE IMAGE
========================================= */

.service-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.03);
}

/* =========================================
   IMAGE HOVER
========================================= */

.service-card:hover .service-image {
    transform: scale(1.05);
}

/* =========================================
   CONTENT AREA
========================================= */

.service-content { 
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px;
}

    /* =========================================
   TITLE
========================================= */

    .service-content h3 {
        margin: 8px 0;
        font-size: 26px;
        color: #c4161c;
        line-height: 1.3;
        font-weight: 700;
    }

/* =========================================
   VIEW DETAILS
========================================= */

.view-details {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #c4161c;
    padding: 5px 12px;
    margin-left: 8px;
    border: 1px solid #c4161c;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: fit-content;
}

    .view-details:hover {
        background: #c4161c;
        color: #fff;
    }

/* =========================================
   DESCRIPTION
========================================= */

.service-short-desc {
    font-size: 15px;
    color: #666;
    margin: 10px 0 18px;
    line-height: 1.6;
    height: 120px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* =========================================
   ORDER BUTTON
========================================= */

.order-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg,#e11d48,#be123c);
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(225,29,72,0.25);
    margin-top: auto;
}

    .order-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(225,29,72,0.35);
        background: linear-gradient(135deg,#be123c,#9f1239);
    }

    .order-btn:active {
        transform: scale(0.98);
    }

/* =========================================
   OFFLINE BUTTON
========================================= */

.offline-btn {
    background: #6c757d !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* =========================================
   GALLERY
========================================= */

.gallery-item {
 
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: .3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .gallery-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 25px rgba(0,0,0,.15);
    }

    .gallery-item img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    .gallery-item h3 {
        margin: 12px 10px 0;
        padding-bottom: 10px;
        font-size: 16px;
        color: #c4161c;
        text-align: center;
    }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(196,22,28,.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0;
    transition: .3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* =========================================
   PAGINATION
========================================= */

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid #c4161c;
    background: #ffffff;
    color: #c4161c;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .pagination-btn:hover {
        background: #c4161c;
        color: #ffffff;
        box-shadow: 0 6px 16px rgba(196,22,28,0.35);
        transform: translateY(-1px);
    }

    .pagination-btn:disabled {
        background: #f3f4f6;
        color: #9ca3af;
        border-color: #d1d5db;
        cursor: not-allowed;
    }

#paginationInfo {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* =========================================
   MODAL
========================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    overflow-y: auto;
    padding: 15px;
    -webkit-overflow-scrolling: touch;
}

/* =========================================
   MODAL CONTENT
========================================= */

.modal-content {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    animation: modalAnimation 0.25s ease;
    position: relative;
}

@keyframes modalAnimation {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0px);
    }
}

/* =========================================
   POPUP TITLE
========================================= */

.service-header {
    margin-bottom: 20px;
}

    .service-header h3 {
        margin: 0;
        color: #0d6efd;
        font-size: 24px;
        font-weight: 700;
    }

/* =========================================
   FORM GROUP
========================================= */

.dynamic-form-group {
    margin-bottom: 20px;
}

/* =========================================
   LABEL
========================================= */

.dynamic-form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.required-star {
    color: red;
    margin-left: 3px;
}

/* =========================================
   INPUTS
========================================= */

.dynamic-input,
.dynamic-select,
.dynamic-textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
}

    .dynamic-input:focus,
    .dynamic-select:focus,
    .dynamic-textarea:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
    }

/* =========================================
   TEXTAREA
========================================= */

.dynamic-textarea {
    min-height: 100px;
    resize: vertical;
}

/* =========================================
   HELP TEXT
========================================= */

.help-text {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
}

/* =========================================
   VALIDATION
========================================= */

.validation-message {
    margin-top: 5px;
    color: #dc3545;
    font-size: 13px;
    display: none;
    font-weight: 500;
}

/* =========================================
   AADHAAR
========================================= */

.aadhaar-input {
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 17px;
}

/* =========================================
   RADIO/CHECKBOX
========================================= */

.radio-group,
.checkbox-group {
    margin-top: 10px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 15px;
}

    .radio-item input,
    .checkbox-item input {
        width: 18px;
        height: 18px;
    }

/* =========================================
   FILE INPUT
========================================= */

input[type="file"] {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #adb5bd;
    width: 100%;
}

/* =========================================
   DOCUMENT BOX
========================================= */

.document-box {
    margin-top: 25px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 15px;
}

    .document-box h4 {
        margin-top: 0;
        color: #ff6f00;
    }

    .document-box ul {
        margin-bottom: 0;
        padding-left: 18px;
    }

/* =========================================
   PRICE BOX
========================================= */

.price-box {
    margin-top: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #dee2e6;
}

    .price-box h3 {
        margin-top: 0;
    }

/* =========================================
   SUMMARY
========================================= */

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 21px;
    font-weight: bold;
    color: #198754;
}

/* =========================================
   BUTTONS
========================================= */
.popup-btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-pay,
.close-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    min-width: 160px;
}

/* Order button */
.btn-pay {
    background-color: #28a745;
    color: white;
}

/* Close button */
.close-btn {
    background-color: #dc3545;
    color: white;
}



/* =========================================
   LOADER
========================================= */

.loader {
    text-align: center;
    padding: 20px;
    font-size: 15px;
    color: #666;
}

/* Customer Details Popup (Modal) */
#customerDetailsModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

    /* Modal Content */
    #customerDetailsModal .modal-content {
        background: #fff;
        border-radius: 16px;
        padding: 30px;
        max-width: 500px;
        margin: 80px auto;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        animation: modalAnimation 0.25s ease;
    }

/* Modal Animation */
@keyframes modalAnimation {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
#customerDetailsModal h3 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #0d6efd;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0d6efd;
}

#customerDetailsModal h4 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    font-weight: 600;
    text-align: left;
}

/* Service Info */
#serviceInfo {
    margin-bottom: 20px;
}

#selectedSubService,
#servicePrice,
#govtservicePrice,
#serviceTotal {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-bottom: 10px;
}

#selectedSubService {
    font-weight: bold;
}

#govtservicePrice {
    color: #27ae60;
}

#serviceTotal {
    font-size: 18px;
    color: #c4161c;
    font-weight: 600;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border: 1px solid #ced4da;
        border-radius: 8px;
        margin-top: 5px;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: #0d6efd;
            outline: none;
        }

/* Required Star */
.required-star {
    color: red;
}

/* Buttons */
.btn-submit,
.btn-close {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    border: none;
    cursor: pointer;
}

.btn-submit {
    background: linear-gradient(135deg, #c4161c, #9f1015);
    color: #fff;
    transition: all 0.25s ease;
}

    .btn-submit:hover {
        background: #9f1015;
        transform: scale(1.05);
    }

.btn-close {
    background: #6c757d;
    color: #fff;
    margin-top: 10px;
}

    .btn-close:hover {
        background: #5a6268;
    }

/* Search Section Container */
.search-section-wrapper {
    max-width: 95%;
    margin: 10px auto;
    padding: 10px 10px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px; /* Reduced padding to save side space */
}

/* Force single line */
.search-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px; /* Slightly tighter gap */
}

.search-title {
    font-size: 1.1rem;
    margin: 0;
    white-space: nowrap;
    color: #333;
    flex-shrink: 0; /* Title won't disappear */
}

.search-controls {
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    gap: 4px; /* Tight gap between input and buttons */
    align-items: center;
    min-width: 0; /* Critical for flex-shrink to work */
}

.search-input {
    flex: 1;
    min-width: 50px; /* Allows it to shrink very small to fit buttons */
    padding: 8px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.button-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0; /* Keeps buttons at full size */
}

.btn-search, .btn-clear {
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.btn-search {
    background-color: #F37254;
    color: white;
}

.btn-clear {
    background-color: #6c757d;
    color: white;
}

/* Highlight fields in red */
.input-error {
    border: 2px solid #ff4d4d !important;
    background-color: #fff9f9;
}

/* Error message text */
.error-message {
    color: #ff4d4d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: bold;
}

.sub-service-container {
    /*display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    min-height: 120px;
    margin-bottom: 18px;*/
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    min-height: 140px;
}


/* BADGES */
.sub-service-badge {
    background: linear-gradient(135deg,#eef4ff,#f8fbff);
    color: #1f4fa3;
    border: 1px solid #dbe7ff;
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.25s ease;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

    .sub-service-badge:hover {
        background: #1f4fa3;
        color: #fff;
        transform: translateY(-2px);
    }
.more-badge {
    background: #f3f4f6;
    color: #444;
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
}
/* FOOTER */
.service-footer {
    /* margin-top: auto;
    padding-top: 12px;*/
    margin-top: auto;
}


/* TITLE */
.service-title {
    font-size: 30px;
    font-weight: 700;
    color: #c4161c;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}
/* Shake animation for a professional feel */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.2s ease-in-out 0s 2;
}

/* MORE SERVICE MODAL */
.more-service-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.more-service-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    animation: popupFade 0.25s ease;
    max-height: calc(100vh - 190px);
}

@keyframes popupFade {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.more-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #eee;
}

    .more-service-header h3 {
        margin: 0;
        color: #c4161c;
    }

.close-more-service {
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.more-service-list {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.popup-service-item {
    background: linear-gradient(135deg,#eef4ff,#f8fbff);
    color: #1f4fa3;
    border: 1px solid #dbe7ff;
    border-radius: 30px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
}
.service-meta {
    display: flex;
    justify-content: left;
    gap: 10px;
    margin: 10px 0 15px;
}

.starting-price {
    background: #e8fff0;
    color: #198754;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}

.service-count {
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}

/* =========================================
   TABLET
========================================= */

@media screen and (max-width: 768px) {

    .service-container {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 0 12px;
    }

    .service-card {
        min-height: 460px;
        height: auto;
    }

    .service-image-container {
        height: 200px;
    }

    .service-content h3 {
        font-size: 22px;
    }

    .service-short-desc {
        font-size: 14px;
    }

    .service-description {
        font-size: 14px;
    }


    .order-btn {
        font-size: 14px;
    }

    .modal {
        padding: 8px;
    }

    .modal-content {
        margin: 10px auto;
        padding: 18px;
        border-radius: 14px;
    }

    .summary-total {
        font-size: 18px;
    }

    .popup-btn-container {
        flex-direction: column;
    }

    .btn-pay,
    .close-btn {
        width: 100%;
        max-width: 300px;
    }

    #customerDetailsModal .modal-content {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }

    .btn-submit,
    .btn-close {
        font-size: 14px;
    }

    #customerDetailsModal h3 {
        font-size: 22px;
    }

    #serviceInfo p {
        font-size: 14px;
    }

    .search-title {
        font-size: 0.9rem; /* Smaller title for mobile */
    }

    .search-input {
        padding: 6px;
        font-size: 13px;
    }

    .btn-search, .btn-clear {
        padding: 6px 8px;
        font-size: 12px;
    }

    .search-wrapper {
        gap: 5px; /* Tighter spacing */
    }
}

/* =========================================
   MOBILE
========================================= */

@media screen and (max-width: 480px) {

    .service-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .service-card {
        min-height: 100%;
        height: auto;
    }

    .service-image-container {
        height: 240px;
    }

    .service-content {
        padding: 18px;
    }

        .service-content h3 {
            font-size: 22px;
        }

    .service-short-desc {
        font-size: 14px;
        line-height: 1.5;
        height: 105px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }

    .service-description {
        font-size: 14px;
        line-height: 1.6;
        color: #666;
        margin-top: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 68px;
    }  

    .close-btn {
        /*margin-top: 15px;*/
        display: inline-block;
        background: #c4161c;
        color: #fff;
        padding: 8px 18px;
        border-radius: 30px;
        cursor: pointer;
    }

        .close-btn:hover {
            cursor: pointer;
            opacity: 0.95;
            transform: translateY(-2px);
        }

    .modal-content {
        padding: 15px;
    }

    .dynamic-form-label {
        font-size: 13px;
    }

    .dynamic-input,
    .dynamic-select,
    .dynamic-textarea {
        padding: 12px;
    }

    .aadhaar-input {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .summary-row {
        font-size: 14px;
    }

    .summary-total {
        font-size: 17px;
    }

    .popup-btn-container {
        flex-direction: column;
    }

    .btn-pay,
    .close-btn {
        width: 100%;
        max-width: 300px;
    }

    #customerDetailsModal .modal-content {
        padding: 15px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }

    #customerDetailsModal h3 {
        font-size: 20px;
    }

    .btn-submit,
    .btn-close {
        font-size: 14px;
    }

    #serviceInfo p {
        font-size: 13px;
    }

    .search-title {
        font-size: 0.85rem; /* Smaller title to make room */
    }

    .search-input {
        font-size: 12px;
        padding: 6px 4px;
    }

    .btn-search, .btn-clear {
        padding: 6px 6px; /* Narrower buttons */
        font-size: 11px;
    }

    .search-wrapper {
        gap: 4px;
    }
}
