
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('icons/provincial.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

.layout {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Header Banner */
.header {
    background-color: #d32f2f;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.header-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.header-logo-left-container {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.header-logo-right-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.header-logo-left,
.header-logo-right {
    height: 80px;
    width: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    text-align: center;
    color: white;
}

.republic-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.provincial-text {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Office Title Band */
.office-title {
    background-color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #d32f2f;
}
.office-title h2 {
    color: #B10000;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    min-height: 60vh;
}

/* Welcome Box */
.welcome-box {
    --s: 100px; /* the ribbon size */
    --d: 20px; /* the depth */
    --c: 20px; /* the cutout part */
    
    padding: 0 calc(var(--s) + var(--d)) var(--d); /* we need some padding so the text doesn't overlap the ribbon part */
    background:
        conic-gradient(at left  var(--s) bottom var(--d),
         #0000 25%,#0008 0 37.5%,#0004 0) 0   /50% no-repeat,
        conic-gradient(at right var(--s) bottom var(--d),
         #0004 62.5%,#0008 0 75%,#0000 0) 100%/50% no-repeat;
    clip-path: polygon(0 var(--d), var(--s) var(--d),var(--s) 0,calc(100% - var(--s)) 0,calc(100% - var(--s)) var(--d),100% var(--d),calc(100% - var(--c)) calc(50% + var(--d)/2),100% 100%,calc(100% - var(--s) - var(--d)) 100%,calc(100% - var(--s) - var(--d)) calc(100% - var(--d)),calc(var(--s) + var(--d)) calc(100% - var(--d)),calc(var(--s) + var(--d)) 100%,0 100%,var(--c) calc(50% + var(--d)/2));
    background-color: #fbfbfb; /* the main color */
    width: fit-content;
    max-width: 1000px;
    margin: 0 auto 40px auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #B10000;
    margin: 15px;
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);*/
}

.welcome-tagline {
    font-size: 1.3rem;
    color: #B10000;
    margin-bottom: 15px;
    font-style: italic;
    /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);*/
}

/* Division Buttons */
.divisions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

.division-btn {
    color: white;
    border: 3px solid #B10000;
    border-radius: 8px;
    padding: 20px 30px;
    width: 300px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.division-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(211, 47, 47, 0.338);
    z-index: 1;
    transition: all 0.3s ease;
}

.division-btn:hover::before {
    background: rgba(183, 28, 28, 0.259);
}

.division-btn h3,
.division-btn .division-label {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Individual division button backgrounds */
.admin-btn {
    background-image: url('icons/ADMIN.webp');
}

.gad-btn {
    background-image: url('icons/GAD.webp');
}

.prsd-btn {
    background-image: url('icons/PRSD.webp');
}

.pdspd-btn {
    background-image: url('icons/PDSPD.webp');
}

.pmed-btn {
    background-image: url('icons/PMED.webp');
}

.division-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.division-btn:focus {
    outline: 3px solid rgba(255, 200, 0, 0.5);
    outline-offset: 2px;
}

.division-btn h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: white;
}

.division-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: white;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 15px;
        gap: 20px;
    }

    .header-logo-left,
    .header-logo-right {
        height: 60px;
        width: 60px;
    }

    .republic-text {
        font-size: 1rem;
    }

    .provincial-text {
        font-size: 1.4rem;
    }

    .office-title {
        padding: 12px 15px;
        gap: 15px;
    }

    .office-logo {
        height: 40px;
        width: 40px;
    }

    .office-title h2 {
        font-size: 1.2rem;
    }

    .welcome-box {
        padding: 30px 40px;
        margin-bottom: 30px;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-tagline {
        font-size: 1.1rem;
    }

    .divisions {
        gap: 15px;
    }

    .division-btn {
        width: 180px;
        height: 120px;
        padding: 15px 25px;
    }

    .division-btn h3 {
        font-size: 1.3rem;
    }

    .division-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px;
        gap: 15px;
    }

    .header-logo-left,
    .header-logo-right {
        height: 50px;
        width: 50px;
    }

    .republic-text {
        font-size: 0.9rem;
    }

    .provincial-text {
        font-size: 1.2rem;
    }

    .office-title {
        padding: 10px 12px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }

    .office-logo {
        height: 35px;
        width: 35px;
    }

    .office-title h2 {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px 15px;
    }

    .welcome-box {
        padding: 25px 30px;
        margin-bottom: 25px;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-tagline {
        font-size: 1rem;
    }

    .divisions {
        gap: 12px;
    }

    .division-btn {
        width: 160px;
        height: 100px;
        padding: 12px 20px;
    }

    .division-btn h3 {
        font-size: 1.2rem;
    }

    .division-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 320px) {
    .header-content {
        padding: 10px;
        gap: 10px;
    }

    .header-logo-left,
    .header-logo-right {
        height: 40px;
        width: 40px;
    }

    .republic-text {
        font-size: 0.8rem;
    }

    .provincial-text {
        font-size: 1rem;
    }

    .office-title h2 {
        font-size: 0.9rem;
    }

    .welcome-title {
        font-size: 1.4rem;
    }

    .welcome-tagline {
        font-size: 0.9rem;
    }

    .division-btn {
        width: 140px;
        height: 90px;
        padding: 10px 15px;
    }

    .division-btn h3 {
        font-size: 1.1rem;
    }

    .division-label {
        font-size: 0.7rem;
    }
}