/* ========================================
   American Dream Law Group - Shared Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
}

:root {
    --gold: #d4af37;
    --dark-gold: #aa8c1a;
    --slate: #1f2937;
    --light-slate: #f3f4f6;
    --cream: #fefdf8;
}

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, var(--slate) 0%, #2d3748 100%);
    color: white;
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.6rem;
    align-items: center;
}

.nav-links > li > a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s;
    padding: 6px 0;
}

.nav-links > li > a:hover {
    color: var(--gold);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f2937;
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
    padding: 8px 0;
    z-index: 200;
    transition: opacity 0.2s, visibility 0.2s;
    padding-top: 12px;
    margin-top: -12px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

.dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: #e5e7eb;
    font-size: 0.93rem;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold);
    padding-left: 24px;
}

.admin-btn {
    background: var(--gold);
    color: var(--slate) !important;
    padding: 0.5rem 1.1rem !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-btn:hover {
    background: var(--dark-gold) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 6px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    background: linear-gradient(135deg, var(--slate) 0%, #2d3748 100%);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.92;
    max-width: 700px;
    margin: 0 auto;
}

/* ========== CONTENT SECTIONS ========== */
.content-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--slate);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
}

.content-section h3 {
    font-size: 1.35rem;
    color: var(--slate);
    margin: 2rem 0 0.8rem;
}

.content-section p {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.content-section ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #4b5563;
}

.content-section li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.category-card {
    background: white;
    border-radius: 14px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    border-left: 5px solid var(--gold);
    transition: transform 0.25s, box-shadow 0.25s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(212,175,55,0.15);
}

.category-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--slate);
}

.category-card p {
    font-size: 0.98rem;
    margin-bottom: 0;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--slate), #1a202c);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-box h2::after {
    display: none;
}

.cta-box p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.8rem;
}

.cta-button {
    display: inline-block;
    background: var(--gold);
    color: var(--slate);
    padding: 1rem 2.4rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s;
}

.cta-button:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

/* ========== FOOTER ========== */
footer {
    background: var(--slate);
    color: white;
    padding: 3rem 1.2rem 1.2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--gold);
}

.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 1.2rem;
}

.social-links img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212,175,55,0.3);
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ========== CHAT WIDGET ========== */
#adlg-chat-button {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #d4af37, #aa8c1a);
    border-radius: 50%;
    box-shadow: 0 6px 22px rgba(212,175,55,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    border: none;
    transition: transform 0.2s;
}

#adlg-chat-button:active {
    transform: scale(0.93);
}

#adlg-chat-button svg {
    width: 28px;
    height: 28px;
    fill: #1f2937;
}

#adlg-chat-window {
    position: fixed;
    bottom: 95px;
    right: 18px;
    width: 370px;
    max-width: calc(100vw - 36px);
    height: 560px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

#adlg-chat-window.open {
    display: flex;
    animation: adlgSlideUp 0.3s ease;
}

@keyframes adlgSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.adlg-chat-header {
    background: linear-gradient(135deg, #1f2937, #2d3748);
    color: white;
    padding: 15px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adlg-chat-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.adlg-chat-header p {
    margin: 3px 0 0;
    font-size: 0.75rem;
    opacity: 0.85;
}

.adlg-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.adlg-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

.adlg-msg {
    max-width: 88%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 0.93rem;
    line-height: 1.45;
}

.adlg-msg.bot {
    background: white;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.adlg-msg.user {
    background: linear-gradient(135deg, #d4af37, #aa8c1a);
    color: #1f2937;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.adlg-options {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 4px;
}

.adlg-option-btn {
    background: white;
    border: 2px solid #d4af37;
    color: #1f2937;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    min-height: 46px;
    transition: all 0.2s;
}

.adlg-option-btn:active {
    background: #d4af37;
    transform: scale(0.98);
}

.adlg-link-btn {
    display: inline-block;
    margin-top: 10px;
    background: #1f2937;
    color: white !important;
    padding: 11px 18px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.adlg-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    background: #25D366;
    color: white !important;
    padding: 13px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    min-height: 50px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #1f2937;
        padding: 0.8rem 1rem 1.2rem;
        gap: 0.2rem;
        box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .dropdown-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        background: #111827;
        margin: 0;
        padding: 0;
        display: none;
        min-width: 100%;
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
    .dropdown-menu a {
        padding: 0.85rem 1.3rem;
    }
    .logo {
        font-size: 1.25rem;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .page-header p {
        font-size: 1.05rem;
    }
    .content-section h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    #adlg-chat-window {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 90px;
        height: 72vh;
        max-height: 72vh;
    }
    #adlg-chat-button {
        bottom: 18px;
        right: 18px;
        width: 58px;
        height: 58px;
    }
    .category-grid {
        grid-template-columns: 1fr;
    }
}