/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles (extracted from homepage) */
.header {
    background: transparent;
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease-in-out;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #4a5568;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-image {
    height: 40px;
    width: auto;
    transition: height 0.3s ease-in-out;
}

.mobile-dxn-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    font-family: 'Helvetica', sans-serif;
    transition: font-size 0.3s ease-in-out;
}

.mobile-menu-close {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.close-line {
    width: 20px;
    height: 2px;
    background-color: #4a5568;
    position: absolute;
    transition: all 0.3s ease;
}

.close-line:nth-child(1) {
    transform: rotate(45deg);
}

.close-line:nth-child(2) {
    transform: rotate(-45deg);
}

.mobile-menu-close:hover .close-line {
    background-color: #ff0000;
}

/* Mobile Navigation */
.mobile-nav {
    padding: 20px 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list li {
    margin: 0;
    padding: 0;
}

.mobile-nav-list a {
    display: block;
    padding: 15px 20px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-list a:hover {
    background-color: #f8f9fa;
    color: #ff0000;
    padding-left: 30px;
}

/* Active state for mobile link */
.mobile-nav-list a.active {
    color: #ff0000;
    background-color: #f8f9fa;
}

.mobile-has-submenu {
    position: relative;
}

.mobile-submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-has-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-has-submenu.active .mobile-submenu {
    max-height: 300px;
}

.mobile-submenu li {
    margin: 0;
    padding: 0;
}

.mobile-submenu a {
    padding: 12px 40px;
    font-size: 14px;
    text-transform: none;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-submenu a:hover {
    background-color: #e2e8f0;
    color: #ff0000;
    padding-left: 50px;
}

.mobile-contact-item {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 2px solid #ff0000;
}

.mobile-slogan-image {
    height: 16px;
    width: auto;
    margin: 10px auto;
    display: block;
}

.mobile-contact-btn {
    background: #ff0000;
    color: white !important;
    border: 2px solid #ff0000 !important;
    padding: 10px 20px !important;
    text-align: center;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.mobile-contact-btn:hover {
    background: white;
    color: #ff0000 !important;
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 100px;
    width: auto;
    transition: height 0.3s ease-in-out;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.dxn-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    line-height: 1;
    margin: 0;
    margin-left: 5px;
    transition: color 0.3s ease-in-out, font-size 0.3s ease-in-out;
    font-family: 'Helvetica', sans-serif;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-list a:hover, .nav-list a.active {
    color: #ff0000;
    text-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
}

/* Submenu styles (placed after main menu link styles) */
.nav-list .has-submenu {
    position: relative;
}

.nav-list .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    display: none;
    z-index: 1001;
}

.nav-list .submenu li {
    padding: 0;
    margin: 0;
}

.nav-list .submenu a {
    display: block;
    padding: 10px 16px;
    color: #4a5568;
    transition: color 0.3s ease, text-shadow 0.3s ease, background 0.3s ease;
}

.nav-list .submenu a:hover {
    background: #f7fafc;
    color: #ff0000;
}

.nav-list .has-submenu:hover > .submenu {
    display: block;
}

/* Contact item with slogan image */
.contact-item {
    position: relative;
}

.slogan-image {
    position: absolute;
    top: -30px;
    right: 0;
    height: 16px;
    width: auto;
    transition: opacity 0.3s ease;
}

.slogan-image:hover {
    opacity: 0.8;
}

.contact-btn {
    color: #ff0000 !important;
    border: 2px solid #ff0000 !important;
    text-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
    padding: 4px 8px !important;
    border-radius: 3px !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out, text-shadow 0.3s ease, box-shadow 0.3s ease;
}

/* Header state classes for JavaScript control */
.header.homepage-top,
.header.non-homepage-top {
    background: transparent;
}

.header.scrolled {
    background: rgba(96, 109, 97, 0.85);
}

.header.homepage-top .logo-image,
.header.non-homepage-top .logo-image {
    height: 100px;
}

.header.scrolled .logo-image {
    height: 60px;
}

.header.homepage-top .dxn-text,
.header.non-homepage-top .dxn-text {
    font-size: 2.5rem;
}

.header.scrolled .dxn-text {
    font-size: 2rem;
}

.header.homepage-top .dxn-text {
    color: #4a5568;
}

.header.non-homepage-top .dxn-text,
.header.scrolled .dxn-text {
    color: white;
}

.header.homepage-top .nav-list a {
    color: #4a5568;
}

.header.non-homepage-top .nav-list a,
.header.scrolled .nav-list a {
    color: white;
}

.header.homepage-top .nav-list a:hover,
.header.homepage-top .nav-list a.active,
.header.non-homepage-top .nav-list a:hover,
.header.non-homepage-top .nav-list a.active,
.header.scrolled .nav-list a:hover,
.header.scrolled .nav-list a.active {
    color: #ff0000;
    text-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
}

/* Mobile menu button color states */
.header.homepage-top .hamburger-line {
    background-color: #4a5568;
}

.header.non-homepage-top .hamburger-line,
.header.scrolled .hamburger-line {
    background-color: white;
}

.header.homepage-top .nav-list .submenu a,
.header.non-homepage-top .nav-list .submenu a,
.header.scrolled .nav-list .submenu a {
    color: #4a5568;
}

.header.homepage-top .nav-list .submenu a:hover,
.header.homepage-top .nav-list .submenu a.active,
.header.non-homepage-top .nav-list .submenu a:hover,
.header.non-homepage-top .nav-list .submenu a.active,
.header.scrolled .nav-list .submenu a:hover,
.header.scrolled .nav-list .submenu a.active {
    color: #ff0000;
    text-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
}

/* Personal Website Top Bar */
.pws-bar {
    position: fixed;
    top: 120px;
    right: 0;
    z-index: 8;
    margin: 8px;
    background: #a8afa8;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pws-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pws-bar-text {
    font-weight: 500;
}

.pws-bar-flag {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.pws-bar-name {
    font-weight: 600;
    white-space: nowrap;
}

.pws-bar-icon {
    color: #606D61;
    text-decoration: none;
    margin-left: 4px;
    font-size: 0.9rem;
}

.pws-bar-icon:hover {
    color: #4d5751;
}

.pws-bar-right {
    flex-shrink: 0;
}

.pws-bar-btn {
    background: #606D61;
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pws-bar-btn:hover {
    background: #4d5751;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

/* Footer Styles (extracted from homepage) */
 .footer {
     background: #606D61;
     color: white;
     padding: 60px 0 0;
 }
 
 .footer-content {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 40px;
     margin-bottom: 40px;
     align-items: start;
 }
 
 .footer-column h3 {
     font-size: 1.1rem;
     margin: 10px 0 14px;
     font-weight: 700;
 }
 
 .footer-icon-img {
     display: block;
     width: 90%;
     height: auto;
     margin-bottom: 15px;
 }
 
 .footer-column p {
     margin-bottom: 10px;
     line-height: 1.6;
 }
 
 .footer-bottom {
     background: #606D61;
     border-top: 1px solid white;
     padding: 20px 0;
     text-align: center;
 }
 
 .footer-bottom p {
     margin-bottom: 10px;
     font-size: 0.9rem;
 }
 
 .footer-links {
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
 }
 
.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease-in-out, text-shadow 0.3s ease;
}
 
 .footer-links a:hover {
     color: #ff0000;
     text-shadow: 0 0 2px rgba(255, 0, 0, 0.5);
 }
 
 .footer-links span {
     color: #7f8c8d;
 }

/* DXN Modal Styles (scoped to prevent conflicts with other modals) */
.dxn-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.dxn-modal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: dxnModalSlideIn 0.3s ease-out;
}

@keyframes dxnModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dxn-modal .modal-content h2 {
    background: #606D61;
    color: white;
    margin: 0;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.dxn-modal .modal-body {
    padding: 30px;
    line-height: 1.6;
}

.dxn-modal .modal-body h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 25px 0 10px 0;
    font-weight: 600;
}

.dxn-modal .modal-body h3:first-child {
    margin-top: 0;
}

.dxn-modal .modal-body p {
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.dxn-modal .modal-body ul {
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
    padding-left: 20px;
}

.dxn-modal .close-modal {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 20px;
}

.dxn-modal .close-modal:hover,
.dxn-modal .close-modal:focus {
    color: #ff0000;
    text-decoration: none;
}

.social-btn {
    background: #606D61;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    margin: 10px auto 0;
    width: fit-content;
}

.social-btn:hover {
    background: #4d5751;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

/* Responsive Design for Header, Footer, and Modal */

/* Desktop (992px and below) */
@media (max-width: 992px) {
    .header .container {
        padding: 0 40px;
    }
    
    .header.homepage-top .logo-image,
    .header.non-homepage-top .logo-image {
        height: 80px;
    }
    
    .header.homepage-top .dxn-text,
    .header.non-homepage-top .dxn-text {
        font-size: 2rem;
    }
    
    /* Hide desktop navigation and show mobile menu button */
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-icon-img {
        width: 80%;
    }
    
    .dxn-modal .modal-content {
        width: 90%;
        max-width: 700px;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .header {
        padding: 15px 0;
    }
    
    .header .container {
        padding: 0 30px;
    }
    
    .header.homepage-top .logo-image,
    .header.non-homepage-top .logo-image {
        height: 70px;
    }
    
    .mobile-menu-content {
        width: 300px;
    }
    
    .slogan-image {
        height: 14px;
        top: -30px;
    }
    
    .footer {
        padding: 50px 0 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 30px;
    }
    
    .footer-column h3 {
        font-size: 1rem;
    }
    
    .footer-icon-img {
        width: 50%;
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
    
    .footer-links {
        gap: 8px;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }

    .dxn-modal .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .dxn-modal .modal-body {
        padding: 20px;
    }
    
    .dxn-modal .modal-content h2 {
        padding: 15px;
        font-size: 1.3rem;
    }
}

/* Mobile Large (576px and below) */
@media (max-width: 576px) {
    .header {
        padding: 12px 0;
    }
    
    .header .container {
        padding: 0 20px;
    }
    
    .logo-image {
        height: 60px !important;
    }
    
    .dxn-text {
        font-size: 1.5rem !important;
    }
    
    .mobile-menu-content {
        width: 280px;
    }
    
    .mobile-menu-header {
        padding: 15px;
    }
    
    .mobile-logo-image {
        height: 35px;
    }
    
    .mobile-dxn-text {
        font-size: 1.3rem;
    }
    
    .slogan-image {
        height: 12px;
        top: -25px;
    }
    
    .footer {
        padding: 40px 0 0;
    }
    
    .footer-content {
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .footer-column h3 {
        font-size: 0.95rem;
    }
    
    .footer-icon-img {
        width: 60%;
    }
    
    .footer-bottom {
        padding: 12px 0;
    }
    
    .footer-links {
        gap: 6px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    .dxn-modal .modal-content {
        width: 96%;
        margin: 8% auto;
        max-height: 88vh;
    }
    
    .dxn-modal .modal-body {
        padding: 18px;
    }
    
    .dxn-modal .modal-content h2 {
        padding: 12px;
        font-size: 1.2rem;
    }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .header .container {
        padding: 0 15px;
    }
    
    .mobile-menu-content {
        width: 100%;
    }
    
    .mobile-menu-header {
        padding: 12px;
    }
    
    .mobile-logo-image {
        height: 30px;
    }
    
    .mobile-dxn-text {
        font-size: 1.2rem;
    }
    
    .mobile-nav-list a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .mobile-submenu a {
        padding: 10px 30px;
        font-size: 13px;
    }
    
    .slogan-image {
        height: 10px;
        top: -20px;
    }
    
    .footer {
        padding: 35px 0 0;
    }
    
    .footer-content {
        gap: 18px;
        margin-bottom: 20px;
    }
    
    .footer-column h3 {
        font-size: 0.9rem;
    }
    
    .footer-icon-img {
        width: 70%;
    }
    
    .footer-bottom {
        padding: 10px 0;
    }
    
    .footer-links {
        gap: 5px;
    }
    
    .footer-links a {
        font-size: 0.75rem;
    }

    .dxn-modal .modal-content {
        width: 98%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .dxn-modal .modal-body {
        padding: 15px;
    }
    
    .dxn-modal .modal-body h3 {
        font-size: 1.1rem;
    }
}
    
/* Mobile Extra Small (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .header {
        padding: 8px 0;
    }
    
    .header .container {
        padding: 0 12px;
    }
    
    .dxn-text {
        font-size: 1.2rem !important;
    }
    
    .mobile-menu-header {
        padding: 10px;
    }
    
    .mobile-logo-image {
        height: 25px;
    }
    
    .mobile-dxn-text {
        font-size: 1.1rem;
    }
    
    .mobile-nav-list a {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .mobile-submenu a {
        padding: 8px 25px;
        font-size: 12px;
    }
    
    .slogan-image {
        height: 8px;
        top: -15px;
    }
    
    .footer {
        padding: 30px 0 0;
    }
    
    .footer-content {
        gap: 15px;
        margin-bottom: 18px;
    }
    
    .footer-column h3 {
        font-size: 0.85rem;
    }
    
    .footer-icon-img {
        width: 90%;
    }
    
    .footer-bottom {
        padding: 8px 0;
    }
    
    .footer-links {
        gap: 4px;
    }
    
    .footer-links a {
        font-size: 0.7rem;
    }

    .dxn-modal .modal-content {
        width: 99%;
        margin: 3% auto;
        max-height: 94vh;
    }
    
    .dxn-modal .modal-body {
        padding: 12px;
    }
    
    .dxn-modal .modal-body h3 {
        font-size: 1rem;
    }
    
    .dxn-modal .modal-content h2 {
        padding: 8px;
        font-size: 1rem;
    }
}

/* Landscape Mobile (max-height: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 5px 0;
    }
    
    .header .container {
        flex-direction: row;
        gap: 15px;
    }
    
    .dxn-text {
        font-size: 1.2rem;
    }
    
    .nav-list {
        gap: 8px;
    }
    
    .nav-list a {
        font-size: 9px;
    }
    
    .footer {
        padding: 20px 0 0;
    }
    
    .footer-content {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .dxn-modal .modal-content {
        margin: 2% auto;
        max-height: 96vh;
    }
}