/* Reset and Base Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Verdana, Geneva, sans-serif;
    background-color: #ffffff;
}

/* App Layout Container (Flexbox replicating frameset) */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Header (replicating topFrame.html with light fixes) */
.app-header {
    height: 166px;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    background-color: #ffffff;
    border: 0;
    margin: 0;
}

.header-left {
    width: 195px;
    height: 166px;
    flex-shrink: 0;
    background-color: #ffffff;
    overflow: hidden;
}

.header-left img {
    display: block;
    width: 226px;
    height: 171px;
    margin-top: -5px;
    margin-left: -31px;
    border: 0;
}

.header-right {
    flex-grow: 1;
    height: 166px;
    background-image: url('images/law_02.gif');
    background-repeat: repeat-x;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
}

.header-logo {
    position: absolute;
    left: 40px; /* Aligns logo with the content padding-left (40px) */
    display: block;
}

.header-logo img {
    border: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centers title and subtitle text items horizontally */
    text-align: center;
}

.header-title {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 24pt;
    color: #ffffff;
    margin: 0;
    padding: 0;
    font-weight: normal;
    line-height: 1.1;
}

.header-subtitle {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 12pt;
    color: #ffffff;
    font-weight: bold;
    margin: 0;
    padding: 0;
    margin-top: 6px;
    line-height: 1.1;
}

/* Middle Layout (Sidebar + Content + Right Border) */
.app-middle {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    width: 100%;
    height: calc(100% - 191px); /* 166px header + 25px footer */
    overflow: hidden;
    background-color: #ffffff;
}

/* Sidebar (replicating menu.html) */
.app-sidebar {
    width: 195px;
    height: 100%;
    flex-shrink: 0;
    background-image: url('images/law_11.gif');
    background-repeat: repeat;
    background-position: -31px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-top {
    height: 52px;
    width: 195px;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-top img {
    display: block;
    width: 255px;
    height: 52px;
    margin-left: -31px;
    border: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nav-btn {
    display: block;
    width: 255px;
    height: 24px;
    margin-left: -31px;
    border: none;
    padding: 0;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 255px 24px;
    background-color: transparent;
    
    /* Hide text on desktop */
    text-indent: -9999px;
    font-size: 0;
    color: transparent;
    overflow: hidden;
}

.nav-btn-home {
    background-image: url('images/0button1.gif');
}

.nav-btn-home:hover, .nav-btn-home.active {
    background-image: url('images/0button2.gif');
}

.nav-btn-realestate {
    background-image: url('images/1button1.gif');
}

.nav-btn-realestate:hover, .nav-btn-realestate.active {
    background-image: url('images/1button2.gif');
}

.nav-btn-trademarks {
    background-image: url('images/2button1.gif');
}

.nav-btn-trademarks:hover, .nav-btn-trademarks.active {
    background-image: url('images/2button2.gif');
}

/* Main Content Container (with light margin fixes) */
.main-content {
    flex-grow: 1;
    height: 100%;
    background-color: #EBEDFF;
    overflow-y: auto;
    padding: 30px 40px; /* Decent, equal margin on left and right (40px) and top/bottom (30px) */
    box-sizing: border-box;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
    color: #000000;
    margin-left: 20px;
    margin-right: 20px;
}

.main-content a {
    color: #3399FF;
    text-decoration: underline;
}

.main-content a:visited {
    color: #FF66FF;
}

.main-content a:active {
    color: #3333FF;
}

/* Tab Switcher Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Right Border Column (replicating rightFrame.html) */
.app-right-border {
    display: none;
}

/* Footer (replicating bottomFrame.html) */
.app-footer {
    height: 25px;
    width: 100%;
    flex-shrink: 0;
    background-image: url('images/law_13.gif');
    background-repeat: repeat-x;
}

/* Content Typography & Layout Helpers */
.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

.font-times {
    font-family: Times, "TIme New Roman", "Times New Roman", serif;
}

.home-contact-block {
    font-family: Times, "TIme New Roman", "Times New Roman", serif;
    margin-top: 15px;
    margin-bottom: 50px;
}

.home-contact-block h2.title-demetrios {
    margin-top: 0;
}

.home-contact-block .subtitle-detail:last-child {
    margin-bottom: 0;
}

#home hr {
    margin-top: 0;
    margin-bottom: 15px;
}

.font-verdana {
    font-family: Verdana, Geneva, sans-serif;
}

.title-demetrios {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0 10px 0;
}

.subtitle-detail {
    font-size: 10px;
    margin: 3px 0;
}

.practice-title {
    font-size: 13px;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

.practice-item {
    font-size: 13px;
    margin: 8px 0;
}

.section-title {
    font-size: 13px;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

#real-estate .section-title,
#trademarks .section-title {
    margin-top: 24px;
}

.about-title,
.contact-title {
    margin-top: 40px;
}

.body-para.contact-end {
    margin-bottom: 45px;
}

.body-para {
    font-size: 13px;
    text-indent: 11px;
    margin: 12px 0;
    line-height: 1.25;
}

.realestate-list {
    list-style-type: none;
    padding-left: 15px;
    margin: 12px 0;
}

.realestate-list li {
    font-size: 13px;
    position: relative;
    padding-left: 15px;
    margin: 12px 0;
    line-height: 1.25;
    text-indent: 0;
}

.realestate-list li::before {
    content: "·";
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ==========================================================================
   Mobile Responsive Styles (Screens < 768px)
   ========================================================================== */
@media (max-width: 767px) {
    html, body {
        overflow: auto; /* Allow full body scrolling on mobile */
    }

    .app-container {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    /* Header stacks vertically */
    .app-header {
        height: auto;
        flex-direction: column;
    }

    .header-left {
        display: none !important;
    }

    .header-logo {
        display: none !important;
    }

    .header-right {
        width: 100%;
        height: 100px; /* Reduced and fixed height for vertical centering */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 20px;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
        /* Replicate the original double white borders at top and bottom */
        background: 
            linear-gradient(to bottom, 
                #ffffff 0px, #ffffff 2px, 
                #000e78 2px, #000e78 4px, 
                #ffffff 4px, #ffffff 6px, 
                transparent 6px, transparent calc(100% - 6px), 
                #ffffff calc(100% - 6px), #ffffff calc(100% - 4px), 
                #000e78 calc(100% - 4px), #000e78 calc(100% - 2px), 
                #ffffff calc(100% - 2px), #ffffff 100%
            ),
            #000e78;
    }

    /* Watermark of the columns image */
    .header-right::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 0;
        right: 0;
        bottom: 6px;
        background-image: url('images/law_01.gif');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        opacity: 0.18; /* Watermark slightly less transparent */
        z-index: 1;
        pointer-events: none;
    }

    .header-text {
        position: relative;
        z-index: 2; /* Keep text on top of the watermark */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header-title {
        font-size: 18px !important;
        text-align: center;
        margin: 0;
        padding: 0;
        font-family: Tahoma, Geneva, sans-serif;
        font-weight: normal;
        color: #ffffff;
        line-height: 1.2;
    }

    .header-subtitle {
        font-size: 11px !important;
        text-align: center;
        margin: 4px 0 0 0;
        padding: 0;
        font-family: Tahoma, Geneva, sans-serif;
        font-weight: bold;
        color: #ffffff;
        line-height: 1.2;
    }

    /* Middle container becomes column layout */
    .app-middle {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Sidebar becomes horizontal top menu */
    .app-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: none;
        position: sticky;
        top: 0;
        z-index: 100;
        background-image: none !important;
        background-color: #EBEDFF;
    }

    .sidebar-top {
        display: none; /* Hide columns graphic on mobile */
    }

    .sidebar-nav {
        flex-direction: row;
        padding: 8px;
        gap: 8px;
        width: 100%;
        display: flex;
        box-sizing: border-box;
        background-color: #EBEDFF;
    }

    .nav-btn {
        flex: 1;
        height: 36px;
        background-image: none !important;
        text-indent: 0 !important;
        font-size: 11px !important;
        color: #000e78 !important;
        font-family: Verdana, Geneva, sans-serif !important;
        font-weight: normal !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 4px !important;
        margin: 0 !important;
        box-sizing: border-box;
        cursor: pointer;
        overflow: visible !important;
        
        background-color: #7081ff !important;
        border-top: 2px solid #ffffff !important;
        border-left: 2px solid #ffffff !important;
        border-bottom: 2px solid #38407f !important;
        border-right: 2px solid #38407f !important;
        border-radius: 0px;
    }

    .nav-btn:hover, .nav-btn.active {
        background-color: #3643a6 !important;
        color: #ffffff !important;
        border-top: 2px solid #ffffff !important;
        border-left: 2px solid #ffffff !important;
        border-bottom: 2px solid #1c246b !important;
        border-right: 2px solid #1c246b !important;
    }

    /* Content Area expands and scrolls normally */
    .main-content {
        padding: 25px 20px; /* Better margin on phones */
        height: auto;
        overflow: visible;
        margin-left: 0;
        margin-right: 0;
    }

    /* Hide decorative right frame on mobile */
    .app-right-border {
        display: none;
    }

    /* Footer fits content */
    .app-footer {
        height: 30px;
        background-image: url('images/law_13.gif');
        background-repeat: repeat-x;
    }
}

