/* terms.css - สไตล์สำหรับหน้าข้อตกลงและนโยบายความเป็นส่วนตัว */

/* โครงสร้างพื้นฐาน */
.terms-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ส่วนหัว */
.terms-header {
    background-color: var(--public-primary);
    background-image: linear-gradient(135deg, var(--public-primary) 0%, var(--public-secondary) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.terms-header .logo {
    font-size: 3rem;
    margin-bottom: 20px;
}

.terms-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.terms-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* เนื้อหา */
.terms-content {
    display: flex;
    min-height: 600px;
}

/* เมนูนำทาง */
.terms-nav {
    width: 280px;
    background-color: #f5f8ff;
    padding: 30px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.terms-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: sticky;
    top: 30px;
}

.terms-nav li {
    margin-bottom: 5px;
}

.terms-nav a {
    display: block;
    padding: 10px 20px;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.terms-nav a:hover {
    background-color: rgba(var(--public-primary-rgb), 0.05);
    color: var(--public-primary);
    border-left-color: var(--public-primary);
}

.terms-nav a.active {
    background-color: rgba(var(--public-primary-rgb), 0.1);
    color: var(--public-primary);
    font-weight: 600;
    border-left-color: var(--public-primary);
}

/* เนื้อหาหลัก */
.terms-sections {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.terms-sections section {
    margin-bottom: 40px;
    scroll-margin-top: 50px;
}

.terms-sections h2 {
    font-size: 1.5rem;
    color: var(--public-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.terms-sections h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-top: 20px;
    margin-bottom: 15px;
}

.terms-sections p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--gray-dark);
}

.terms-sections ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.terms-sections li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--gray-dark);
}

/* ส่วนท้าย */
.terms-footer {
    padding: 30px 40px;
    background-color: #f9faff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.terms-footer p {
    color: var(--gray);
    margin-bottom: 20px;
}

.terms-footer a {
    color: var(--public-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.terms-footer a:hover {
    text-decoration: underline;
    color: var(--public-secondary);
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn-back,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 200px;
    position: relative;
    overflow: visible;
    white-space: nowrap;
}

.btn-back {
    background-color: #f1f1f1;
    color: var(--gray-dark) !important;
}

.btn-back:hover {
    background-color: #e5e5e5;
    text-decoration: none;
}

.btn-login {
    background-color: var(--public-primary);
    color: white !important;
}

.btn-login:hover {
    background-color: var(--public-secondary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer-actions i {
    margin-right: 8px;
    display: inline-block;
}

.footer-actions a span {
    display: inline-block;
}

.copyright {
    margin-top: 20px;
}

.copyright p {
    font-size: 0.85rem;
    color: var(--gray);
    opacity: 0.8;
    margin-bottom: 0;
}

/* ข้อมูลการติดต่อ */
.contact-info {
    background-color: #f5f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .terms-content {
        flex-direction: column;
    }
    
    .terms-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 20px;
    }
    
    .terms-nav ul {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .terms-nav li {
        margin-bottom: 0;
    }
    
    .terms-nav a {
        padding: 8px 15px;
        border-left: none;
        border-radius: 20px;
        font-size: 0.9rem;
    }
    
    .terms-nav a.active {
        border-left: none;
        background-color: var(--public-primary);
        color: white;
    }
}

@media (max-width: 768px) {
    .terms-container {
        margin: 20px;
        width: auto;
    }
    
    .terms-header {
        padding: 30px 15px;
    }
    
    .terms-header h1 {
        font-size: 1.8rem;
    }
    
    .terms-sections {
        padding: 20px;
    }
    
    .footer-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-back, .btn-login {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .terms-header .logo {
        font-size: 2.5rem;
    }
    
    .terms-header h1 {
        font-size: 1.5rem;
    }
    
    .terms-nav {
        padding: 15px 10px;
    }
    
    .terms-nav ul {
        gap: 3px;
    }
    
    .terms-nav a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .terms-sections h2 {
        font-size: 1.3rem;
    }
    
    .terms-sections h3 {
        font-size: 1.1rem;
    }
}