/*
Theme Name: Allen Legal Custom
Description: Custom theme for Allen Legal Language with brand colors
Version: 1.0
Author: ANNA Technologies
*/

:root {
    --primary-green: #245C45;
    --sage-green: #b4cebb;
    --light-green: #2d7356;
    --lighter-green: #f0f9f4;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --gray-light: #f4f4f4;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', 'Helvetica', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--sage-green);
}

html {
    overflow-x: clip;
}

/* Container */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--sage-green);
    color: var(--text-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* GTranslate Widget Styling - Compact & Beautiful */
.gtranslate_wrapper,
#gt_float_wrapper {
    position: relative;
    z-index: 9999 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Adjust GTranslate position - offset to create gap from edge */
div[id^="gtranslate_menu_wrapper"] {
    right: -38px !important;
}

/* Float switcher wrapper - remove ALL borders */
.gt_float_switcher {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Remove borders from ALL children but NOT .gt-selected itself */
.gt-selected > *,
.gt-selected div,
.gt-selected span,
.gt-selected img,
.gt-selected a,
.gt-current-lang,
.gt-current-lang *,
.gt-lang-code,
.gt_float_switcher-arrow {
    border: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* .gt-selected gets ONE border */
.gt-selected {
    background: transparent !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    margin-top: 7px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    min-width: auto !important;
    height: auto !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Inner .gt-current-lang - NO border, text styling only */
.gt-current-lang {
    background: transparent !important;
    color: #000 !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    font-family: 'Lato', sans-serif !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

.gt-selected:hover,
.gt-current-lang:hover {
    opacity: 0.7 !important;
}

/* Hide flag images - we're using text only */
.gt-current-lang img {
    display: none !important;
}

/* Show native language text - bold, black */
.gt-lang-code,
.gt_float_switcher .gt-selected .gt-current-lang span.gt-lang-code {
    display: inline-block !important;
    font-weight: 900 !important;
    color: #000 !important;
    font-size: 16px !important;
    line-height: normal !important;
    text-align: center !important;
    white-space: nowrap !important;
    text-transform: none !important;
    position: static !important;
    top: 0 !important;
    vertical-align: baseline !important;
}

/* Hide arrow */
.gt_float_switcher-arrow,
.gt_arrow_rotate {
    display: none !important;
}

/* Dropdown panel - NO GAP, touching button */
.gt_options {
    background-color: white !important;
    border: 1px solid var(--light-green) !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(36, 92, 69, 0.15) !important;
    padding: 4px 0 !important;
    min-width: 160px !important;
    max-width: 200px !important;
    margin-top: 0 !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: 100% !important;
}

/* Language links - TEXT ONLY, no flags */
.gt_options a.nturl {
    display: block !important;
    padding: 10px 16px !important;
    color: var(--primary-green) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: background 0.2s ease !important;
    background: transparent !important;
    text-align: left !important;
}

.gt_options a.nturl:hover {
    background: var(--lighter-green) !important;
}

/* Current/active language in dropdown */
.gt_options a.nturl.gt-current {
    background: var(--sage-green) !important;
    font-weight: 600 !important;
}

/* Hide flags in dropdown - text only */
.gt_options a.nturl img {
    display: none !important;
}

/* Hide Google Translate branding */
#google_translate_element2,
.goog-te-gadget,
.VIpgJd-ZVi9od-l4eHX-hSRGPd {
    display: none !important;
}

/* Alternative switcher button styles */
.gt_switcher,
button.gt_switcher,
a.gt_switcher {
    background: var(--primary-green) !important;
    color: white !important;
    border: none !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.gt_switcher:hover,
button.gt_switcher:hover,
a.gt_switcher:hover {
    opacity: 0.9 !important;
}

.gt_switcher img {
    width: 20px !important;
    height: 15px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gt-selected,
    .gt-current-lang {
        padding: 3px !important;
    }

    .gt-current-lang img {
        width: 22px !important;
        height: 16px !important;
    }

    .gt_options {
        min-width: 140px !important;
        max-width: 180px !important;
    }

    .gt_options a.nturl {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}

.header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header .site-title {
    margin: 0;
}

.site-header .site-title a {
    display: block;
    line-height: 0;
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .site-logo {
        height: 35px;
    }
}

/* Navigation - Desktop Only */
@media (min-width: 769px) {
    .main-navigation {
        background: transparent;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 0;
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
        flex-direction: row;
        overflow-y: visible;
    }

    .main-navigation ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 40px;
        flex-direction: row;
        text-align: initial;
    }


    .main-navigation li {
        margin: 0;
        position: relative;
        width: auto;
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 10px 0;
        color: var(--primary-green);
        text-decoration: none;
        font-size: 18px;
        transition: opacity 0.3s;
        position: relative;
        width: auto;
    }

    .main-navigation a:hover {
        opacity: 0.7;
    }

    .main-navigation .current-menu-item a {
        font-weight: 400;
    }

    .main-navigation .current-menu-item a::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--primary-green);
    }
}

/* Hero Section */
.hero-section {
    background: var(--primary-green);
    color: var(--white);
    padding: 100px 40px;
    text-align: center;
}

.hero-section h1 {
    color: var(--white);
    font-size: 64px;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-section p {
    color: rgba(255,255,255,0.9);
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Content */
.site-content {
    padding: 0;
    min-height: 60vh;
    background: var(--white);
}

.content-area {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.entry-content {
    margin-top: 30px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* 3-Column Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.service-card {
    text-align: center;
}

.service-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--white);
    font-size: 24px;
    font-weight: 300;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: var(--sage-green);
    padding: 80px 40px;
    text-align: center;
}

.cta-section h2 {
    color: var(--primary-green);
    font-size: 48px;
    font-weight: 400;
    margin-bottom: 20px;
}

.cta-section p {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-button {
    background: var(--primary-green);
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 0;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}

.cta-button:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-green);
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 400;
}

h1:first-child,
h2:first-child,
h3:first-child {
    margin-top: 0;
}

h1 {
    font-size: 36px;
    margin-bottom: 24px;
}

h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 20px;
    line-height: 1.7;
}

ul, ol {
    margin: 0 0 24px 0;
    padding-left: 40px;
    line-height: 1.8;
}

li {
    margin-bottom: 10px;
}

ul ul, ol ol, ul ol, ol ul {
    margin-top: 10px;
    margin-bottom: 0;
}

strong, b {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--light-green);
    text-decoration: underline;
}

/* Buttons */
.submit-button,
button[type="submit"],
.wp-block-button__link {
    background: var(--primary-green);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
}

.submit-button:hover,
button[type="submit"]:hover,
.wp-block-button__link:hover {
    background: var(--light-green);
    text-decoration: none;
}

/* Forms */
.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--gray-light);
    border-radius: 8px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 22px;
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.required {
    color: #dc3545;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(61, 90, 74, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.allen-quote-intro {
    background: var(--lighter-green);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    border-left: 4px solid var(--primary-green);
}

.allen-quote-intro p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: var(--sage-green);
    color: var(--text-dark);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer p {
    margin: 0;
    font-size: 14px;
}

.site-footer a {
    color: var(--text-dark);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--primary-green);
    font-size: 20px;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 0.7;
}

/* User Menu / Logout */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
}

.user-greeting {
    color: var(--white);
    font-size: 14px;
}

.logout-link {
    background: var(--primary-green);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-link:hover {
    background: #1a4533;
}

/* Mobile Menu Toggle - Hidden by default on desktop */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
        z-index: 1001;
    }
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger stays as hamburger - no X transform */

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 15px 20px;
    }

    .site-logo {
        height: 30px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .gt-selected {
        margin-right: 0 !important;
        margin-top: 7px !important;
        padding: 6px 10px !important;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background: var(--sage-green);
        box-shadow: -4px 0 15px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        flex-direction: column;
        padding: 30px 0 20px 0;
        z-index: 1000;
        overflow-y: auto;
    }

    .main-navigation.mobile-open {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid rgba(36, 92, 69, 0.15);
        list-style: none;
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        padding: 18px 30px;
        width: 100%;
        display: block;
        font-size: 18px;
        color: var(--primary-green);
        text-decoration: none;
        font-weight: 500;
        transition: background 0.2s ease;
    }

    .main-navigation a:hover {
        background: rgba(36, 92, 69, 0.1);
    }

    .main-navigation .current-menu-item a {
        background: rgba(36, 92, 69, 0.15);
        font-weight: 600;
    }

    .hero-section {
        padding: 60px 20px;
    }

    .hero-section h1 {
        font-size: 36px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .cta-section {
        padding: 60px 20px;
    }

    .cta-section h2 {
        font-size: 32px;
    }

    .site-content {
        padding: 0;
    }

    .content-area {
        padding: 40px 20px;
    }

    .footer-wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 20px;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
}

/* WordPress Block Editor Compatibility */
.wp-block-columns {
    margin-bottom: 0;
    max-width: 100% !important;
}

.wp-block-column {
    margin-bottom: 0;
}

.wp-block-button__link {
    background: var(--primary-green) !important;
    color: var(--white) !important;
    padding: 15px 40px !important;
    border-radius: 0 !important;
    font-size: 18px !important;
    text-decoration: none !important;
    border: none !important;
}

.wp-block-button__link:hover {
    opacity: 0.8 !important;
}

.has-primary-green-background-color {
    background-color: var(--primary-green) !important;
}

.has-sage-green-background-color {
    background-color: var(--sage-green) !important;
}

/* Full-width blocks */
.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* Override content area width for full-width blocks */
.entry-content .wp-block-columns.alignfull,
.entry-content .wp-block-group.alignfull {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Hero section styling */
.entry-content > .wp-block-heading.has-text-align-center:first-child {
    margin-top: 0 !important;
    font-size: 64px;
    font-weight: 300;
    line-height: 1.2;
}

/* Override default paragraph spacing in colored sections */
.has-background p {
    margin-bottom: 0;
}

/* Better spacing for blocks */
.wp-block-group {
    margin-bottom: 0;
}

.wp-block-heading + .wp-block-paragraph {
    margin-top: 0;
}

/* Service cards with images */
.wp-block-column .wp-block-image {
    margin-bottom: 20px;
}

.wp-block-column .wp-block-image img {
    border-radius: 8px;
    width: 100%;
    height: 280px;
    object-fit: cover;
}

/* Responsive column adjustments */
@media (max-width: 768px) {
    .entry-content > .wp-block-heading.has-text-align-center:first-child {
        font-size: 36px !important;
        padding: 60px 20px !important;
    }

    .wp-block-group.alignfull {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .wp-block-columns {
        flex-direction: column !important;
    }

    .wp-block-column {
        flex-basis: 100% !important;
        margin-left: 0 !important;
    }

    [style*="font-size:64px"] {
        font-size: 36px !important;
    }

    [style*="font-size:48px"] {
        font-size: 32px !important;
    }

    .wp-block-button {
        width: 100%;
    }

    .wp-block-button__link {
        width: 100% !important;
        text-align: center !important;
    }
}
