* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f7fb;
}

/* CENTER WHOLE PAGE */
.page-wrapper {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
}

/* MAIN FORM CARD */
.form-container {
    width: 100%;
    max-width: 1400px; /* wide but centered */
    background: #ffffff;
    padding: 50px 60px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* When sidebar is collapsed */
.sidebar-collapsed .content-wrapper {
    margin-left: 80px; /* collapsed sidebar width */
}

/* FORM CONTAINER */
.form-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 1400px;   /* ðŸ‘ˆ MUCH BIGGER */
    margin: 0 auto;
}

/* HEADERS */
.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #003366;
    margin-bottom: 20px;
    border-left: 4px solid #003366;
    padding-left: 10px;
}

.section-header {
    font-size: 22px;
    font-weight: bold;
    color: #003366;
    margin-bottom: 30px;
    text-align: center;
}

/* GRID SYSTEM */
.row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.row-1 { grid-template-columns: 1fr; }
.row-2 { grid-template-columns: repeat(2, 1fr); }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }

/* FORM STYLE */
.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #003366;
    outline: none;
}

/* MAP & SUBSCRIPTION WRAPPER */
.subscription-map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* BUTTONS */
button {
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover {
    opacity: 0.9;
}

/* MODAL */
/* ================= OVERLAY ================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 0;
}

.modal-overlay.active {
    display: flex;
}

/* ================= BASE MODAL ================= */
.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===================================================== */
/* 🔥 DECLARATION MODAL (FORCED LARGE — BULLETPROOF) */
/* ===================================================== */
#declarationModal .modal-content {
    position: fixed !important;

    /* CENTER FIX */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* 🔥 SIZE */
    width: 96vw !important;
    max-width: 1000px !important;
    min-width: 900px !important;

    height: 92vh !important;

    padding: 30px 50px;
}

/* Declaration body */
#declarationModal .modal-body {
    text-align: justify;
    text-justify: inter-word;
}

#declarationModal .modal-body p {
    margin-bottom: 16px;
}

/* ===================================================== */
/* ✍️ SIGNATURE MODAL (SMALL & CLEAN) */
/* ===================================================== */
#signatureModal .modal-content {
    width: 600px;
    max-width: 95vw;
    padding: 25px;
}

/* Canvas fix */
#signatureCanvas {
    width: 100%;
    height: 250px;
    background: #fff;
    border-radius: 6px;
}

/* ===================================================== */
/* HEADINGS */
/* ===================================================== */
.modal-content h3 {
    text-align: center;
    color: #003366;
    margin-bottom: 15px;
    font-weight: 700;
}

/* ===================================================== */
/* BUTTON */
/* ===================================================== */
.modal-close-btn {
    margin-top: 20px;
    align-self: center;

    background: #003366;
    color: #fff;

    padding: 12px 30px;
    border: none;
    border-radius: 6px;

    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.modal-close-btn:hover {
    background: #0055aa;
}

/* ===================================================== */
/* SCROLLBAR (OPTIONAL CLEAN LOOK) */
/* ===================================================== */
#declarationModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#declarationModal .modal-body::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

/* ===================================================== */
/* MOBILE RESPONSIVE */
/* ===================================================== */
@media (max-width: 1024px) {

    #declarationModal .modal-content {
        width: 95vw !important;
        min-width: unset !important;
        height: 90vh !important;
        padding: 20px;
    }
}

@media (max-width: 768px) {

    #signatureModal .modal-content {
        width: 95vw;
    }
}


/* ================= RESPONSIVE BREAKPOINTS ================= */

/* Large tablets */
@media (max-width: 1200px) {
    .row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 992px) {

    .content-wrapper {
        margin-left: 0;
        padding: 30px 20px;
    }

    .row-3,
    .row-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .subscription-map-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .form-container {
        padding: 25px 15px;
        border-radius: 8px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-header {
        font-size: 20px;
    }

    .row-2,
    .row-3,
    .row-4 {
        grid-template-columns: 1fr;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 10px;
    }
}

/* Very Small Phones */
@media (max-width: 480px) {

    .form-container {
        padding: 20px 12px;
    }

    .section-header {
        font-size: 18px;
    }

    button {
        width: 100%;
        margin-top: 10px;
    }
}

/* ===== MODAL BUTTON STYLE ===== */
.modal-close-btn {
    background: #003366;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #00509e;
}

/* Secondary button (Clear) */
.modal-clear-btn {
    background: #f1f1f1;
    color: #333;
    padding: 10px 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-clear-btn:hover {
    background: #e2e2e2;
}

/* PLAN GRID */

.plan-grid{
display:grid;
grid-template-columns: repeat(6, 1fr);
gap:20px;
margin-top:15px;
}

/* tablets */
@media (max-width:1200px){
.plan-grid{
grid-template-columns: repeat(3,1fr);
}
}

/* mobile */
@media (max-width:768px){
.plan-grid{
grid-template-columns: repeat(2,1fr);
}
}

/* very small phones */
@media (max-width:480px){
.plan-grid{
grid-template-columns:1fr;
}
}

.plan-card{
background:#fff;
border:1px solid #eee;
border-radius:14px;
padding:20px;
cursor:pointer;
text-align:center;
transition:0.25s;
position:relative;
}

.plan-card:hover{
transform:translateY(-6px);
box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.plan-card input{
display:none;
}

.plan-card h4{
color:#003366;
margin-bottom:5px;
}

.plan-card .speed{
font-size:20px;
font-weight:bold;
color:#0073e6;
}

.plan-card .price{
display:block;
margin-top:6px;
font-size:20px;
font-weight:700;
color:#222;
}

.plan-card .plan-desc{
font-size:12px;
color:#888;
margin-top:4px;
}

/* SELECTED PLAN */

.plan-card input:checked + h4,
.plan-card input:checked ~ *{
color:#003366;
}

.plan-card input:checked{
}

.plan-card:has(input:checked){
border:2px solid #003366;
box-shadow:0 10px 30px rgba(0,51,102,0.15);
}

/* Marker drop animation */

.leaflet-marker-icon.fil-drop {
    animation: filMarkerDrop 0.35s ease;
}

@keyframes filMarkerDrop {

0%{
transform: scale(0.3);
opacity:0;
}

60%{
transform: scale(1.15);
opacity:1;
}

100%{
transform: scale(1);
}

}
.content-layout{
    display:grid;
    grid-template-columns: 220px 1fr 220px;
    gap:20px;
    align-items:start;
}

.side-ad{
    position:relative;
    top:20px;
}

.side-ad img{
    width:100%;
    max-width:400px;
    border-radius:10px;
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

/* MOBILE */
@media (max-width:1100px){

.content-layout{
    grid-template-columns:1fr;
}

.side-ad{
    display:none;
}

}

/* ================= FOOTER ================= */

.footer{
background:#003366;
color:white;
padding:60px 20px 20px 20px;
}

.footer-container{
max-width:1100px;
margin:auto;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:40px;
}

.footer-col h3,
.footer-col h4{
margin-bottom:15px;
}

.footer-col p{
font-size:14px;
line-height:1.6;
color:#ddd;
}

.footer-col i{
margin-right:8px;
}

.social-link{
display:inline-block;
color:white;
text-decoration:none;
margin-top:5px;
}

.social-link:hover{
color:red;
}

.footer-bottom{
text-align:center;
margin-top:40px;
border-top:1px solid rgba(255,255,255,0.1);
padding-top:15px;
font-size:13px;
color:#ccc;
}

/* ATTACHMENT SECTION */
.attachment-section {
    margin-top: 30px;
}

/* GRID */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* CARD */
.upload-card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    transition: 0.25s;
}

.upload-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.upload-card label {
    font-weight: 600;
    font-size: 14px;
    color: #003366;
    margin-bottom: 10px;
    display: block;
}

/* UPLOAD BOX */
.upload-box {
    border: 2px dashed #003366;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    background: #f9fbff;
}

.upload-box:hover {
    background: #eef4ff;
    border-color: #0073e6;
}

/* ICON */
.upload-box i {
    font-size: 28px;
    color: #003366;
    margin-bottom: 8px;
}

/* TEXT */
.upload-box span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-box small {
    font-size: 12px;
    color: #777;
}

/* HIDE INPUT */
.upload-box input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-name {
    margin-top: 8px;
    font-size: 12px;
    color: #003366;
    font-weight: 600;
    word-break: break-all;
}

.upload-box.has-file {
    border: 2px solid #28a745;
    background: #f0fff4;
}

.upload-box.has-file .upload-text {
    display: none;
}
/* =========================================
   GLOBAL RESPONSIVE IMPROVEMENTS
========================================= */

/* Make everything flexible */
.row {
    display: grid;
    gap: 15px;
}

/* AUTO RESPONSIVE GRID (SMART) */
.row-2,
.row-3,
.row-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* FIX nested row inside row */
.row > div {
    width: 100%;
}

/* =========================================
   DECLARATION + SIGNATURE + MAP FIX
========================================= */

@media (max-width: 992px) {
    /* Stack 3 columns into 1 */
    .row[style*="grid-template-columns: 1fr 1fr 1.2fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================
   ATTACHMENT GRID FIX
========================================= */

.attachment-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* =========================================
   PLAN GRID IMPROVEMENT
========================================= */

.plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* =========================================
   FORM CONTAINER MOBILE FIX
========================================= */

@media (max-width: 768px) {

    .page-wrapper {
        padding: 20px 10px;
    }

    .form-container {
        padding: 20px 15px;
        border-radius: 10px;
    }

    /* Buttons full width */
    button {
        width: 100%;
    }
}

/* =========================================
   MAP FIX (IMPORTANT)
========================================= */

#map {
    width: 100%;
    min-height: 200px;
}

/* =========================================
   MODAL FIX
========================================= */

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* =========================================
   SIGNATURE CANVAS FIX (CRITICAL)
========================================= */

#signatureCanvas {
    width: 100% !important;
    height: 200px !important;
}

/* =========================================
   SMALL PHONE OPTIMIZATION
========================================= */

@media (max-width: 480px) {

    .section-title {
        font-size: 14px;
    }

    .section-header {
        font-size: 18px;
    }

    .form-group label {
        font-size: 12px;
    }

}
.declaration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .declaration-grid {
        grid-template-columns: 1fr;
    }
}