* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.5;
    padding: 0; /* header ઉપર અને footer નીચે સ્ક્રીનની ધારને ટચ થાય એ માટે */
}

/* હેડર અને ફૂટર પ્લેસહોલ્ડર - પૂરી પહોળાઈ, કોઈ ગેપ નહીં */
#header-placeholder,
#footer-placeholder {
    width: 100%;
}

/* --- હેડર બાર (સ્ક્રીનની ટોચે ટચ) --- */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 12px 25px;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- ફૂટર બાર (સ્ક્રીનની નીચે ટચ, footer.js દ્વારા ઇન્જેક્ટ થતું હોય તો) --- */
.footer-bar {
    margin: 0;
    border-radius: 0;
}

/* ફોર્મ અને સાઇડ-કન્ટેન્ટ માટે લેફ્ટ-રાઇટ તેમજ header/footer થી થોડું ગેપ */
.page-wrapper {
    padding: 15px;
}

.logo { color: white; font-size: 22px; font-weight: bold; }
.home-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}
.home-btn:hover { background-color: white; color: #1e3c72; }

/* --- ફિક્સ લેઆઉટ માળખું --- */
.page-wrapper {
    display: flex;
    gap: 15px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: flex-start;
}

/* સાઇડ પેનલ્સ ફિક્સ કદ */
.side-panel {
    flex: 0 0 230px; /* સાઇડબારની પહોળાઈ હંમેશા ફિક્સ ૨૩૦ પિક્સેલ રહેશે */
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.side-panel-title {
    color: #1e3c72;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 6px;
    margin-bottom: 12px;
    font-size: 16px;
}

.side-panel-links li { list-style: none; margin-bottom: 6px; }
.side-panel-links a { color: darkred; text-decoration: none; font-size: 13px; font-weight: bolder; }

/* --- જાહેરાત (Ad) બોક્સ --- */
.promo-rail {
    position: sticky;
    top: 15px;
    padding: 8px;
}

.promo-slot {
    width: 100%;
    min-height: 250px;
    background-color: #f0f2f5;
    border: 1px dashed #b8c2cc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a94a0;
    font-size: 13px;
    letter-spacing: 1px;
}

.promo-tag {
    text-transform: uppercase;
}

/* --- મોટા મોનિટર પર સાઇડ પેનલ અને પ્રમો બોક્સ મોટા --- */
@media screen and (min-width: 1300px) {
    .page-wrapper {
        max-width: 1500px;
    }

    .side-panel {
        flex: 0 0 270px;
    }

    .promo-slot {
        min-height: 380px;
    }
}

@media screen and (min-width: 1600px) {
    .page-wrapper {
        max-width: 1760px;
    }

    .side-panel {
        flex: 0 0 320px;
    }

    .promo-slot {
        min-height: 520px;
    }
}

@media screen and (min-width: 1920px) {
    .page-wrapper {
        max-width: 2000px;
    }

    .side-panel {
        flex: 0 0 380px;
    }

    .promo-slot {
        min-height: 650px;
    }
}

/* --- કોમ્પેક્ટ ઇનપુટ ફોર્મ --- */
.form-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px 25px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.form-container h2 {
    color: #1e3c72;
    margin-bottom: 15px;
    text-align: center;
    font-size: 22px;
}

.form-section {
    background-color: #fafbfc;
    border: 1px solid #eef2f5;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.form-section h3 { margin-bottom: 12px; color: #2c3e50; font-size: 16px; border-bottom: 1px dashed #ccc; padding-bottom: 4px; }
.form-group { margin-bottom: 10px; }
label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; color: #444; }

input[type="text"], select {
    width: 100%;
    padding: 6px 8px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

input:focus, select:focus {
    border-color: #1e3c72;
    outline: none;
}

/* કોમ્પેક્ટ રો (૨ કોલમ લેઆઉટ) */
.row { display: flex; gap: 15px; margin-bottom: 10px; }
.col { flex: 1; }
.font-wide { flex: 1.3; } 

.print-btn {
    width: 100%;
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.print-btn:hover { background-color: #218838; }

/* --- પત્ર પ્રિન્ટ સેટિંગ્સ --- */
.print-only { display: none !important; }

@media print {
    .no-print, .header-bar, .side-panel, .promo-rail, .form-container { display: none !important; }
    .print-only { display: block !important; }
    body { background-color: white; padding: 0; }
    .page-wrapper { display: block; width: 100%; }
    
    @page { size: A4; margin: 20mm; }
    .a4-page { width: 100%; padding: 0; margin: 0; }
    .print-header-date { margin-inline-start: 400px; margin-bottom: 25px; }
    .letter-top-section { display: flex; justify-content: space-between; margin-bottom: 40px; }
    .to-section, .from-section-right { width: 45%; line-height: 1.8; font-size: 14pt; }
    .subject-line { text-align: center; font-weight: bold; margin-bottom: 40px; font-size: 15pt; }
    .letter-body { line-height: 2; text-align: justify; margin-bottom: 50px; font-size: 14pt; }
    .letter-footer { display: flex; justify-content: space-between; margin-top: 60px; font-size: 14pt; }
    .signature { text-align: center; }
    .bold-text { font-weight: bold; }
    .bold-text-underline { font-weight: bold; text-decoration: underline; }
}

/* ==========================================================================
   🔥🔥 પાવરફુલ મોબાઇલ રિસ્પોન્સિવ મીડિયા ક્વેરીઝ (૭૬૮px થી નાની સ્ક્રીન) 🔥固
   ========================================================================== */
@media screen and (max-width: 768px) {
    
    body {
        padding: 0 !important;
        overflow-x: hidden !important; /* આડું સ્ક્રોલિંગ સખત બંધ */
    }

    /* લેઆઉટને વર્ટિકલ (એકની નીચે એક) કરવા માટે સખત ફોર્સ */
    .page-wrapper {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 8px !important;
    }

    .promo-rail {
        position: static !important;
    }

    .promo-slot {
        min-height: 90px !important;
    }

    /* સાઇડ પેનલ મોબાઇલમાં આખી પહોળાઈ લઈ લેશે */
    .side-panel {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* મુખ્ય ફોર્મ કન્ટેનર સ્ક્રીન માપનું થઈ જશે */
    .form-container {
        width: 100% !important;
        padding: 15px 12px !important;
    }

    .form-container h2 {
        font-size: 18px !important;
    }

    /* 🛑 સૌથી મહત્વનું: આડા બોક્સને મોબાઇલમાં ઊભા (Vertical) કરવા માટે */
    .row {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 0px !important;
    }

    .col, .font-wide {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* ડેટા એન્ટ્રી અને ટાઈપિંગ સરળ બનાવવા માટે ઇનપુટ સાઇઝ */
    input[type="text"], select {
        width: 100% !important;
        padding: 11px 10px !important; /* પરફેક્ટ ટચ સ્પેસ */
        font-size: 15px !important; /* આનાથી ગૂગલ ક્રોમ પેજ ઝૂમ નહીં કરે */
    }

    label {
        font-size: 13px !important;
        margin-bottom: 3px !important;
    }

    /* ચેકબોક્સની સાઇઝ મોટી કરો જેથી ટચ કરવામાં ભૂલ ન થાય */
    input[type="checkbox"] {
        transform: scale(1.2) !important;
        margin-right: 8px !important;
    }

    /* પ્રિન્ટ બટન મોટું અને ફુલ સ્ક્રીન */
    .print-btn {
        padding: 14px !important;
        font-size: 16px !important;
    }
}
