/**
 * Custom styles for Root Law Office
 * Extracted from inline styles in HTML pages
 */

/* ===================================
   Typography - Paragraphs
   =================================== */
.root-elements.root-not-footer:not(.root-header-elements) div.paragraph,
.root-elements.root-not-footer:not(.root-header-elements) p,
#root-content div.paragraph,
#root-content p {
    font-family: "Muli" !important;
    letter-spacing: 0px !important;
}

/* ===================================
   Typography - Headings
   =================================== */
.root-elements.root-not-footer:not(.root-header-elements) h2,
#root-content h2 {
    font-family: "Ubuntu" !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* ===================================
   Site Title
   =================================== */
#root-title {
    font-family: "Architects Daughter" !important;
    color: #111010 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 42px !important;
}

/* ===================================
   Navigation Menu
   =================================== */
.root-menu-default a {
    font-family: "Montserrat" !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 2px !important;
    font-size: 16px !important;
}

/* ===================================
   Headlines & Section Titles
   =================================== */
.root-headline,
.root-header-section .root-content-title {
    font-family: "Open Sans" !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
    font-size: 26px !important;
}

/* ===================================
   Buttons
   =================================== */
.root-button-inner {
    font-family: "Ubuntu" !important;
    font-weight: 400 !important;
    letter-spacing: 4px !important;
}

.root-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.root-button:hover {
    background-color: #555;
}

/* ===================================
   Background
   =================================== */
.root-background {
    background-image: url("../images/1183713689.jpeg") !important;
    background-repeat: no-repeat !important;
    background-position: 41.67% 24.55% !important;
    background-size: cover !important;
    background-color: transparent !important;
    background-attachment: fixed !important;
}

/* ===================================
   Responsive Styles
   =================================== */

/* Desktop Styles (min-width: 768px) */
@media screen and (min-width: 768px) {
    #root-content h2 {
        font-size: 24px !important;
    }
}

/* ===================================
   Tablet Styles (max-width: 992px)
   =================================== */
@media screen and (max-width: 992px) {
    /* Navigation */
    .header-wrap #logo {
        font-size: 2em;
        text-align: center;
    }

    .header-wrap #logo #root-title {
        font-size: 32px !important;
        max-width: 100%;
    }

    .header-wrap .root-logo {
        padding: 0 50px;
        text-align: center;
    }

    /* Banner */
    .banner-wrap {
        padding-top: 55px;
    }

    .banner-wrap .banner h2 {
        font-size: 2.5em !important;
    }

    .banner-wrap .banner .paragraph,
    .banner-wrap .banner p {
        padding: 10px 0;
        font-size: 1.2em !important;
    }

    .banner-wrap font {
        font-size: inherit !important;
        line-height: inherit !important;
    }

    /* Main Content */
    #main-wrap .container {
        padding: 40px 1.5em;
    }

    /* Typography - Tablet */
    #root-content h2 {
        font-size: 24px !important;
    }

    .paragraph,
    p {
        font-size: 16px !important;
        line-height: 1.8em !important;
    }

    /* Footer */
    #footer-wrap .root-footer {
        padding: 40px 0;
    }

    /* Multi-column adjustments for tablet */
    .root-multicol-table {
        width: calc(100% + 30px);
        margin: 0 -15px;
        display: table;
    }

    .root-multicol-table td {
        padding: 0 15px !important;
        display: table-cell;
    }

    /* About page - keep 2 column on tablet for intro section */
    .root-page-about .root-multicol-table td[style*="width: 45%"],
    .root-page-about .root-multicol-table td[style*="width: 55%"] {
        display: table-cell !important;
        float: none !important;
    }

    /* About page - member section: photo + content 2 columns */
    .root-page-about .root-multicol-table td[style*="width: 19%"] {
        display: table-cell !important;
        float: none !important;
        width: 136px !important;
        vertical-align: top;
    }

    .root-page-about .root-multicol-table td[style*="width: 81%"] {
        display: table-cell !important;
        float: none !important;
        vertical-align: top;
    }

    /* About page - member photo size on tablet (約 106px) */
    .root-page-about .root-multicol-table td[style*="width: 19%"] img {
        max-width: 106px !important;
        width: 106px !important;
        height: auto !important;
    }

    /* About page - keep inner columns (學經歷/著作) as 2 columns */
    .root-page-about .root-multicol-table td[style*="width: 81%"] .root-multicol-table td[style*="width: 42%"],
    .root-page-about .root-multicol-table td[style*="width: 81%"] .root-multicol-table td[style*="width: 58%"] {
        display: table-cell !important;
        float: none !important;
        vertical-align: top;
    }
}

/* ===================================
   Mobile Styles (max-width: 767px)
   =================================== */
@media screen and (max-width: 767px) {
    /* Typography */
    body {
        font-size: 14px;
    }

    h2 {
        font-size: 18.2px !important;
        line-height: 27.3px !important;
    }

    .paragraph,
    p {
        padding: 0 0 1.5em;
        font-size: 14px !important;
        line-height: 23.8px !important;
    }

    h2 font,
    .paragraph font,
    p font {
        font-size: inherit !important;
    }

    /* Container */
    .container {
        width: 100%;
        padding: 0 24px !important;
        overflow-wrap: break-word;
    }

    /* Site Title */
    #root-title {
        font-size: 28px !important;
        letter-spacing: 0px !important;
    }

    .header-wrap .root-logo {
        padding: 0 50px;
        text-align: center;
    }

    /* Banner */
    .banner-wrap .banner h2 {
        font-size: 1.8em !important;
    }

    .banner-wrap .banner .paragraph,
    .banner-wrap .banner p {
        padding: 10px 0;
        font-size: 1em !important;
    }

    /* Banner text centering on mobile */
    .banner-wrap .banner,
    .banner-wrap .banner .root-section-elements,
    .banner-wrap .banner .root-section-elements h2,
    .banner-wrap .banner .root-section-elements .paragraph,
    .banner-wrap .banner .root-section-elements p {
        text-align: center !important;
    }

    /* Sections */
    .root-section {
        height: auto !important;
    }

    .root-section-elements {
        overflow: hidden;
    }

    /* Main Content */
    #main-wrap {
        background: #fff;
    }

    #main-wrap .container {
        padding: 25px 24px !important;
    }

    /* Multi-column to Single Column */
    .root-multicol {
        display: block;
        width: 100%;
    }

    .root-multicol-table {
        display: table !important;
        width: calc(100% + 30px) !important;
        margin: 0 -15px !important;
    }

    .root-multicol-table tbody {
        display: table-row-group !important;
        width: 100% !important;
    }

    .root-multicol-table tr {
        display: table-row !important;
        width: 100% !important;
    }

    .root-multicol-table td,
    td.root-multicol-col {
        float: none !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
        padding: 0 15px !important;
    }

    /* Images */
    .root-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Content Title */
    .root-content-title {
        text-align: left !important;
        font-size: 18.2px !important;
        margin-bottom: 10px;
    }

    /* Footer */
    #footer-wrap {
        position: relative;
        right: 0;
    }

    #footer-wrap .paragraph,
    #footer-wrap p {
        font-size: 1em !important;
    }

    #footer-wrap .root-footer {
        padding: 30px 0;
    }

    #footer-wrap .root-footer > span {
        float: none !important;
        display: block !important;
        width: 100% !important;
        text-align: center;
        margin-bottom: 15px;
    }

    #footer-wrap .root-footer > span img {
        margin: 0 auto !important;
        display: block;
    }

    #footer-wrap .root-footer .paragraph {
        text-align: center;
    }

    /* Buttons */
    .root-button-large .root-button-inner {
        height: auto;
        font-size: 0.8em;
        line-height: 1.75em;
    }

    /* Form adjustments */
    .root-form-field {
        max-width: none;
    }

    /* Headline adjustments */
    .root-headline,
    .root-header-section .root-content-title {
        font-size: 20px !important;
    }

    /* Services page - list adjustments */
    .root-page-services .paragraph ul {
        padding-left: 1.5em !important;
    }

    .root-page-services .paragraph ul li {
        margin-bottom: 8px;
    }

    .root-page-services .paragraph ul li font {
        font-size: inherit !important;
    }

    /* About page adjustments */
    .root-page-about .colored-box-content {
        padding: 10px 15px 0 15px;
    }

    .root-page-about .colored-box-content h2 {
        font-size: 1.2em !important;
        margin-bottom: 5px;
    }

    /* About page - intro section (關於植根): force single column layout */
    /* Photo (45%) on top, description (55%) below */
    .root-page-about .root-multicol-table td[style*="width: 45%"],
    .root-page-about .root-multicol-table td[style*="width: 55%"] {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    /* About page - member section: force single column layout */
    /* Outer table containing photo (19%) and content (81%) */
    .root-page-about .root-multicol-table td[style*="width: 19%"],
    .root-page-about .root-multicol-table td[style*="width: 81%"] {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    /* About page - member photo on mobile (200px, not full width) */
    .root-page-about .root-multicol-table td[style*="width: 19%"] img {
        width: 200px !important;
        max-width: 200px !important;
        height: auto !important;
    }

    /* About page - member photo container on mobile */
    .root-page-about .root-multicol-table td[style*="width: 19%"] .root-image {
        text-align: left !important;
    }

    /* About page - inner columns (學經歷 42% / 著作 58%): force single column */
    .root-page-about .root-multicol-table td[style*="width: 81%"] .root-multicol-table td[style*="width: 42%"],
    .root-page-about .root-multicol-table td[style*="width: 81%"] .root-multicol-table td[style*="width: 58%"] {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    /* Contact page adjustments */
    .root-page-contact .root-map iframe {
        height: 200px !important;
        margin-bottom: 15px;
    }

    /* Contact form name fields */
    .root-page-contact .root-form-field > div[style*="display: flex"] {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===================================
   Small Mobile Styles (max-width: 480px)
   =================================== */
@media screen and (max-width: 480px) {
    /* Site Title */
    #root-title {
        font-size: 24px !important;
    }

    /* Banner */
    .banner-wrap .banner h2 {
        font-size: 1.5em !important;
    }

    .banner-wrap .banner .paragraph font,
    .banner-wrap .banner p font {
        font-size: 14px !important;
    }

    /* Footer */
    #footer-wrap .root-footer {
        padding: 20px 0;
    }

    /* Container tighter padding */
    .container {
        padding: 0 15px !important;
    }

    #main-wrap .container {
        padding: 20px 15px !important;
    }

    /* Services page */
    .root-page-services .paragraph ul li strong font {
        font-size: 14px !important;
    }

    /* About page - member info */
    .root-page-about .root-multicol-table td[style*="width: 19%"] {
        width: 100% !important;
        text-align: left;
        margin-bottom: 15px;
    }

    .root-page-about .root-multicol-table td[style*="width: 19%"] img {
        max-width: 150px !important;
        width: 150px !important;
    }

    .root-page-about .root-multicol-table td[style*="width: 81%"] {
        width: 100% !important;
    }

    /* Mobile menu bottom nav items */
    .navmobile-wrapper .root-menu-default {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navmobile-wrapper .root-menu-item-wrap {
        flex: 0 0 auto;
        padding: 5px 10px;
    }

    .navmobile-wrapper .root-menu-item {
        font-size: 14px !important;
    }
}

/* ===================================
   Colored Box (About Page)
   =================================== */
.colored-box-content {
    clear: both;
    float: left;
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(248, 234, 169, 0.7);
    padding: 10px 20px 0 20px;
}

/* ===================================
   Form Styles (Contact Page)
   =================================== */
.root-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.root-form-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.root-form-input:focus {
    border-color: #666;
    outline: none;
}

textarea.root-form-input {
    height: 200px;
    resize: vertical;
}

.form-required {
    color: red;
}
