/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:wght@400;600;700;800&display=swap');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - From Reference */
    --purple-dark: #2E021F;
    /* Deep Plum Background */
    --purple-light: #4A0E36;
    --accent-red: #FF3636;
    /* Bright Red/Orange */
    --secondary-color: #00A884;
    /* Teal Green */

    --text-dark: #1A1A1A;
    --text-body: #666666;
    --white: #FFFFFF;
    --bg-light: #F8F9FA;

    --container-width: 1200px;
    --border-radius: 8px;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;

    --transition: all 0.3s ease;
}

/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Section Headers */
.section-title {
    margin-bottom: 50px;
    position: relative;
}

.section-title .sub-heading {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 14px;
}

.section-title h2 {
    font-size: 38px;
    line-height: 1.2;
    font-weight: 800;
}

/* Top Bar (Red Strip) */
.top-bar {
    background-color: #A00000;
    /* Darker Red for top bar */
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
}

.top-contact span {
    margin-right: 20px;
}

.top-contact i {
    margin-right: 5px;
    opacity: 0.8;
}

.top-social a {
    color: var(--white);
    margin-left: 15px;
    opacity: 0.8;
}

.top-social a:hover {
    opacity: 1;
}

/* Header (Dark Purple) */
.main-header {
    background-color: var(--purple-dark);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h2 {
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
    margin: 0;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    opacity: 0.9;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-red);
    opacity: 1;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
}

/* Notification System */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
}

.notif-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--purple-dark);
    animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 54, 54, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(255, 54, 54, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 54, 54, 0);
    }
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    max-width: 90vw;
    /* Responsive width */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform-origin: top right;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-dropdown.active {
    display: block;
}

.notif-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--purple-dark);
}

.notif-count {
    background: var(--accent-red);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.notif-body {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 15px 20px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.notif-item.new {
    background: rgba(255, 54, 54, 0.03);
}

.notif-icon {
    width: 35px;
    height: 35px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    flex-shrink: 0;
}

.notif-info p {
    font-size: 13px;
    margin: 0 0 5px;
    line-height: 1.4;
    color: var(--text-dark);
}

.notif-time {
    font-size: 11px;
    color: var(--text-body);
}

.notif-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.notif-footer a {
    font-size: 12px;
    color: var(--accent-red);
    font-weight: 700;
}

/* Hero Section (Purple Background + Split Layout) */
.hero-section {
    background-color: var(--purple-dark);
    padding: 100px 0 220px;
    /* Increased bottom padding to prevent collision */
    position: relative;
    color: var(--white);
    overflow: hidden;
}

/* Background Hexagon Patterns (Decorative) */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 600px;
    height: 600px;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgNTBMMzAgMTVHNzAgMTVMMTkwIDUwTDcwIDg1TDMwIDg1WiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJGYmZmZmYwNSIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+');
    opacity: 0.1;
    z-index: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text .sub-title {
    display: inline-block;
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-size: 14px;
}

.hero-text h1 {
    font-size: 70px;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Hexagon Mask for Main Image */
.hex-mask-large {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--white);
    /* Border effect */
    padding: 10px;
    /* Thickness of border */
}

.hex-mask-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hero-badge {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: var(--white);
    color: var(--text-dark);
    padding: 20px;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.hero-badge .big-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-red);
    line-height: 1;
}

.hero-badge .text {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    line-height: normal;
}

.btn-red {
    background: linear-gradient(135deg, #FF3636 0%, #D40000 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 54, 54, 0.3);
    border: none;
}

.btn-red:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 54, 54, 0.4);
    filter: brightness(1.1);
    color: var(--white);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--purple-dark);
}

.btn-outline-red {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-outline-red:hover {
    background: var(--accent-red);
    color: var(--white);
}

.btn-outline-teal {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-teal:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-outline-purple {
    border-color: var(--purple-dark);
    color: var(--purple-dark);
}

.btn-outline-purple:hover {
    background: var(--purple-dark);
    color: var(--white);
}

/* Feature Cards Overlap */
.feature-section-overlap {
    margin-top: -150px;
    /* Deepened overlap */
    position: relative;
    z-index: 10;
    padding-top: 0;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.icon-hex {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--purple-dark);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: var(--transition);
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(100%);
}

.feature-card:hover .icon-hex,
.active-card .icon-hex {
    background: var(--accent-red);
    color: var(--white);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-card p {
    margin-bottom: 25px;
    font-size: 15px;
}

.link-btn {
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.link-btn i {
    font-size: 12px;
    margin-left: 5px;
    color: var(--accent-red);
}

/* About Masks & Layout */
.about-wrapper {
    align-items: center;
}

.hex-mask-medium {
    width: 100%;
    max-width: 400px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    margin-bottom: -50px;
    margin-left: 20px;
}

.hex-mask-small {
    width: 250px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 5px solid var(--white);
    position: absolute;
    bottom: -30px;
    left: -20px;
}

.about-text .sub-heading {
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.about-text h2 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.about-text .lead {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
}

.core-objectives {
    margin-top: 25px;
    margin-bottom: 25px;
}

.core-objectives h4 {
    margin-bottom: 15px;
    color: var(--purple-dark);
}

.objectives-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.objectives-list li {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.objectives-list li i {
    color: var(--accent-red);
    margin-right: 10px;
    font-size: 14px;
}

.stat-box {
    text-align: center;
}

.stat-box .num {
    font-size: 36px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.stat-box .label {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-body);
}

/* Shape Divider */
.shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.shape-divider-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.shape-fill {
    fill: #FFFFFF;
}

/* Causes Cards */
.causes-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.causes-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--accent-red);
}

.causes-img {
    height: 240px;
}

.causes-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.causes-content {
    padding: 30px;
}

.causes-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.process-bar {
    height: 6px;
    background: #eee;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.process-bar span {
    display: block;
    height: 100%;
    border-radius: 10px;
}

.causes-meta {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.causes-card .btn {
    display: block;
    width: 100%;
    margin-top: 15px;
}

/* Fun Facts Icons */
.icon-hex-small {
    width: 60px;
    height: 60px;
    background: var(--purple-light);
    color: var(--white);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.fun-facts .section-title {
    margin-bottom: 70px;
}

.counter-box {
    margin-top: 20px;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--purple-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay Utility */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Hero Animations */
.hero-anim-1,
.hero-anim-2,
.hero-anim-3,
.hero-anim-4 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.hero-anim-1 {
    animation-delay: 0.5s;
}

.hero-anim-2 {
    animation-delay: 0.7s;
}

.hero-anim-3 {
    animation-delay: 0.9s;
}

.hero-anim-4 {
    animation-delay: 1.1s;
}

.hero-anim-img {
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 1s forwards;
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulsing Badge */
.pulsing-badge {
    animation: float 3s ease-in-out infinite, pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 54, 54, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 54, 54, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 54, 54, 0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }

    .section-padding {
        padding: 60px 0;
    }

    /* Header Fixes */
    .top-bar {
        display: none;
    }

    .main-header {
        padding: 15px 0;
    }

    .logo h2 {
        font-size: 26px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--purple-dark);
        padding: 80px 40px;
        transition: 0.4s;
        z-index: 999;
        display: block !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav a {
        font-size: 18px;
        display: block;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .logo {
        order: 1;
        flex: 1;
    }

    .mobile-toggle {
        display: block !important;
        z-index: 1000;
        order: 4;
        margin-left: 10px;
    }

    .header-btn {
        display: flex !important;
        gap: 10px;
        order: 2;
        /* Position between logo and toggle */
    }

    .header-btn .btn-red {
        padding: 10px 15px;
        font-size: 11px;
    }

    .header-btn .btn-red i {
        display: none;
        /* Hide icon on very small screens to save space */
    }

    .notif-btn {
        width: 38px;
        height: 38px;
    }

    .notif-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform-origin: top center;
    }

    /* Hero Fixes */
    .hero-section {
        padding: 60px 0 100px;
        text-align: center;
    }

    .hero-container {
        flex-direction: column;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        max-width: 100%;
    }

    .hex-mask-large {
        max-width: 320px;
    }

    /* Feature Cards */
    .feature-section-overlap {
        margin-top: -60px;
    }



    /* About Section - Stays side-by-side on Tablet (768px+), Stacks on Mobile */
}

@media (max-width: 768px) {
    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .about-text .lead {
        margin: 0 auto 20px;
        border-left: none;
        border-top: 4px solid var(--secondary-color);
        padding: 15px 0 0;
    }


    .about-images {
        margin-top: 40px;
    }

    .hex-mask-medium {
        margin: 0 auto;
    }

    .hex-mask-small {
        display: none;
    }

    /* Grid Stacking - REMOVED to allow auto-fit on tablets */
    /* .grid { grid-template-columns: 1fr !important; } */

    /* Fun Facts */
    .fun-facts .grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    /* Force single column on mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    .objectives-list {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 34px;
    }

    .fun-facts .grid {
        grid-template-columns: 1fr !important;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
}

/* =========================================
   Premium Professional Form (Theme Integrated)
   ========================================= */

.reg-form-container.govt-theme {
    background: #fff;
    padding: 40px;
    border: none;
    /* Removed harsh border */
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    /* Theme Font */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* Soft Shadow */
    position: relative;
    overflow: hidden;
}

/* Decorative Top Bar */
.reg-form-container.govt-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--purple-dark), var(--accent-red));
}

.govt-header {
    border-bottom: 2px solid var(--purple-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.header-row h2 {
    color: var(--purple-dark);
    font-size: 24px;
    letter-spacing: 1px;
}

/* Grids with Theme Colors */
.govt-grid-top,
.govt-table-grid {
    border: 1px solid var(--purple-dark);
    /* Theme Color Border */
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(21, 0, 16, 0.05);
    /* Subtle shadow */
}

.govt-grid-top {
    background: #fff;
    grid-template-columns: 1fr 200px;
}

/* Rows & Transitions */
.govt-row,
.g-col-label,
.g-col-input {
    border-color: rgba(21, 0, 16, 0.1);
    /* Light Purple Border */
    transition: all 0.3s ease;
}

.govt-row,
.g-col-label,
.g-col-input {
    border-right: 1px solid rgba(21, 0, 16, 0.1);
    border-bottom: 1px solid rgba(21, 0, 16, 0.1);
}

.govt-row:hover,
.govt-table-grid>div:hover {
    background: #f9f9ff;
    /* Lightest Purple Tint on Hover */
}

/* Inputs with Animation */
.field-input input,
.g-col-input input,
.g-col-input select {
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.field-input input:focus,
.g-col-input input:focus,
.g-col-input select:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(74, 14, 54, 0.1);
    /* Soft Purple Glow */
    outline: none;
    transform: scale(1.01);
    /* Subtle Pop */
}

/* Labels */
.field-label,
.g-col-label {
    color: var(--purple-dark);
    font-weight: 700;
}

.g-col-label {
    background: rgba(21, 0, 16, 0.03);
    /* Very light purple bg for labels */
}

/* Full Width Headers inside Grid */
.g-col-label.full-row-label {
    background: var(--purple-dark);
    color: #fff;
    border-right: none;
}

/* Photo Box styled */
.photo-box,
.sig-box {
    border: 2px dashed var(--purple-dark);
    background: #fdfdfd;
    border-radius: 8px;
    transition: 0.3s;
}

.photo-box:hover,
.sig-box:hover {
    background: rgba(21, 0, 16, 0.05);
    border-style: solid;
}

/* Section Header */
.govt-section-header {
    background: linear-gradient(90deg, var(--purple-dark), #2a0033);
    border: none;
    border-radius: 5px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 0;
    text-align: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    /* Attach to grid */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.govt-table-grid {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

/* Buttons */
.btn-red {
    background: var(--accent-red);
    color: #fff;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.4s;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 69, 0, 0.3);
}

.btn-red:hover {
    background: var(--purple-dark);
    box-shadow: 0 10px 20px rgba(21, 0, 16, 0.3);
    transform: translateY(-3px);
}

/* Layout Utilities (Recopied for safety) */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.govt-grid-top {
    display: grid;
    /* grid-template-columns set above */
    gap: 20px;
    padding: 20px;
}

.govt-row {
    display: flex;
    align-items: center;
    padding: 10px;
}

.field-num,
.f-num {
    width: auto;
    min-width: 30px;
    font-weight: bold;
    margin-right: 10px;
}

.field-label {
    width: 200px;
    text-transform: uppercase;
    font-size: 13px;
}

.field-input {
    flex: 1;
}

.field-input input {
    width: 100%;
    padding: 8px;
}

.govt-table-grid {
    display: grid;
    /* Adjusted grid to give more space to labels */
    grid-template-columns: 50px 220px 1fr 50px 220px 1fr;
}

.g-col-label,
.g-col-input {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 13px;
    gap: 4px;
}

.g-col-input input {
    width: 100%;
    padding: 8px;
}

.full-row-label {
    grid-column: 1 / 3;
}

.full-row-input {
    grid-column: 3 / -1;
}

.photo-sig-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 20px !important;
    /* Force internal spacing */
}

.photo-box {
    width: 132px;
    /* 3.5cm */
    height: 170px;
    /* 4.5cm */
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    position: relative;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
    border: 1px solid #ccc;
    /* Add border for visibility */
}

/* Allow overflow when image is present to show button if needed, 
   though we will keep button inside now */
.photo-box.has-image,
.sig-box.has-image {
    overflow: visible;
    border-color: #333;
}

.sig-box {
    width: 210px;
    /* ~5.5cm */
    height: 60px;
    /* ~1.6cm */
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    position: relative;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
    border: 1px solid #ccc;
    /* Add border */
}

.photo-box:hover,
.sig-box:hover {
    border-color: var(--accent-red);
}

.photo-box input[type="file"],
.sig-box input[type="file"] {
    display: none;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shows full image without cropping */
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    padding: 5px;
    /* Adds space inside the box */
    background: #f9f9f9;
}

.placeholder-text {
    z-index: 2;
    pointer-events: none;
}

.has-image .placeholder-text {
    display: none;
}

.delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    transition: transform 0.2s;
}

.delete-btn:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.has-image .delete-btn {
    display: flex;
}


.photo-box input,
.sig-box input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .reg-form-container.govt-theme {
        padding: 15px;
    }

    .govt-grid-top {
        grid-template-columns: 1fr;
    }

    .govt-table-grid {
        grid-template-columns: 1fr;
    }

    .g-col-label,
    .g-col-input,
    .full-row-label,
    .full-row-input {
        grid-column: 1 / -1;
        width: 100%;
        display: block;
        border-right: none;
    }

    .g-col-label {
        background: #eee;
        padding: 5px 10px;
    }

    .g-col-input {
        padding: 10px;
    }
}

.govt-footer {
    border-top: 1px solid var(--purple-dark);
    /* Changed from black */
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 30px;
}

.declaration {
    flex: 1;
    font-size: 12px;
    padding-right: 20px;
    font-style: italic;
    color: #555;
}

.sign-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.stamp-box {
    width: 150px;
    height: 60px;
    border: 1px dashed var(--purple-dark);
    color: var(--purple-dark);
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   FINAL LAYOUT FIX & SIZING (V3 - WIDE & ROBUST)
   ========================================= */

/* 1. Global Box Sizing & Body Fix */
*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 2. Container Width Increase (Fixed Cut-off) */
.reg-form-container.govt-theme {
    max-width: 1300px !important;
    /* Extremely Wide */
    width: 98% !important;
    /* Use full screen width */
    padding: 20px !important;
    /* Reduce padding to save space */
    margin: 20px auto !important;
    overflow: visible !important;
    /* Prevent clipping */
}

/* 3. Gap Border Grid (Perfect Alignment) */
.govt-table-grid {
    display: grid !important;
    /* 4 Cols: Fixed | Auto | Fixed | Auto */
    /* Changed 1fr to minmax to preventing shrinking too much */
    grid-template-columns: 280px 1fr 280px 1fr !important;

    /* The 'Gap Border' Trick */
    background: rgba(40, 0, 30, 0.3) !important;
    /* Darker border color */
    border: 1px solid rgba(40, 0, 30, 0.3);
    gap: 1px;
    padding: 1px;
}

/* 4. Reset Items */
.g-col-label,
.g-col-input,
.full-row-label,
.full-row-input {
    border: none !important;
    /* No individual borders */
    background: #fff;
    padding: 15px !important;
    height: auto !important;
    display: flex;
    align-items: center;
    position: relative;
    /* For z-index if needed */
}

/* 5. Hover Fixes */
/* Header Cells (Dark) - Stay Dark on Hover */
.g-col-label.full-row-label:hover {
    background: var(--purple-dark) !important;
    color: #fff !important;
}

/* Normal Cells - Light Hover */
.g-col-label:not(.full-row-label):hover,
.g-col-input:hover {
    background: #fcfcff;
    /* Very subtle tint */
}

/* 6. Spanning Logic */
.full-row-label {
    grid-column: 1 / 3 !important;
    background: var(--purple-dark) !important;
    color: #fff !important;
    justify-content: center;
    font-size: 14px !important;
    letter-spacing: 0.5px;
}

.full-row-input {
    grid-column: 3 / -1 !important;
}

/* 7. Input Sizes (Taller & Wider) */
.g-col-input input,
.g-col-input select,
.field-input input {
    height: 55px !important;
    /* Huge Inputs */
    padding: 0 15px !important;
    font-size: 16px !important;
    background: #f8f8fa;
    width: 100% !important;
    border: 1px solid #ccc;
    font-weight: 500;
}

/* Photo Area Fix */
.photo-sig-area {
    width: 220px;
    /* Fixed only on Desktop */
}

.photo-box,
.sig-box {
    width: 100% !important;
}

/* Mobile Fallback */
@media (max-width: 991px) {
    .reg-form-container.govt-theme {
        width: 100% !important;
        padding: 15px !important;
    }

    .govt-table-grid {
        grid-template-columns: 1fr !important;
        background: transparent !important;
        border: none !important;
        gap: 0;
    }

    .g-col-label,
    .g-col-input,
    .full-row-label,
    .full-row-input {
        grid-column: 1 / -1 !important;
        border: 1px solid #ddd !important;
        margin-bottom: -1px;
        padding: 10px 15px !important;
    }

    .g-col-label {
        background: #f1f1f1 !important;
        font-weight: bold;
    }

    .g-col-label.full-row-label {
        margin-top: 15px !important;
        border: none !important;
        background: var(--purple-dark) !important;
        color: #fff !important;
        display: flex !important;
        justify-content: center;
        text-align: center;
    }

    /* Ensure input text is always dark on white background */
    .g-col-input input,
    .full-row-input input {
        color: #333 !important;
        background: #fff !important;
    }

    .photo-sig-area {
        width: 100% !important;
        flex-direction: row;
        gap: 15px;
        justify-content: center;
    }

    .photo-box,
    .sig-box {
        width: 150px !important;
        margin: 0;
    }
}

@media (max-width: 576px) {
    .photo-sig-area {
        flex-direction: column;
    }

    .photo-box,
    .sig-box {
        width: 100% !important;
    }

    .g-col-input input,
    .g-col-input select {
        height: 45px !important;
    }

    .field-label {
        width: 100% !important;
        margin-bottom: 5px;
    }

    .govt-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .govt-grid-top {
        grid-template-columns: 1fr !important;
    }
}

/* Success Overlay Responsive */
.success-content {
    padding: 25px;
    width: 95%;
}

/* 
   Consolidated OTR Portal Responsiveness 
   Forces stacked layout only on small screens 
*/
@media (max-width: 991px) {
    .reg-form-container.govt-theme {
        width: 100% !important;
        padding: 10px !important;
        margin: 5px auto !important;
        border-radius: 0 !important;
    }

    .govt-header .header-row {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .govt-grid-top {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
    }

    .govt-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 8px 0 !important;
    }

    .field-label {
        width: 100% !important;
        margin-bottom: 5px !important;
        font-weight: 700 !important;
    }

    /* Standardizes all table grids to single column */
    .govt-table-grid {
        grid-template-columns: 1fr !important;
        border: none !important;
        gap: 0 !important;
        background: transparent !important;
    }

    .g-col-label,
    .g-col-input,
    .full-row-label,
    .full-row-input {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        border: 1px solid #ddd !important;
        margin-bottom: -1px !important;
    }

    .g-col-label {
        background: #f8f8f8 !important;
        font-weight: bold !important;
    }

    /* Footer stacking */
    .govt-footer {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 30px !important;
        padding: 20px !important;
    }

    .declaration {
        width: 100% !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .sign-area {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .photo-sig-area {
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .photo-box,
    .sig-box {
        width: 100% !important;
        max-width: 280px !important;
        margin: 10px auto !important;
    }
}

/* Helper for very small mobile screens (Single Line Header) */
@media (max-width: 480px) {
    .logo h2 {
        font-size: 18px !important;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-header {
        padding: 10px 0 !important;
    }
}