/* Visaesta.co.il - Main Stylesheet - RTL Support */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: 'Segoe UI', 'Arial Hebrew', 'David', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: transparent;
    border: none;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--secondary-color);
}

.btn-success:hover {
    background: #059669;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.card h3 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-size: 1.25rem;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-right: 4px solid;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--primary-color);
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--secondary-color);
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border-color: var(--error);
    color: #991b1b;
}

/* Subtle/Greyed Alerts for less important information */
.alert-subtle {
    background: #f3f4f6;
    border-color: var(--border-color);
    color: var(--text-light);
    border-right-width: 2px;
}

.alert-subtle strong {
    color: var(--text-color);
    font-weight: 500;
}

.disclaimer-box-subtle {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.disclaimer-box-subtle strong {
    color: var(--text-light);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.disclaimer-box-subtle p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.tdac-form h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tdac-form h3:first-of-type {
    margin-top: 0;
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--white);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Blog */
.blog-list {
    display: grid;
    gap: 2rem;
}

.blog-item {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.blog-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.blog-item .meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-item p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    nav.active {
        max-height: 500px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 2rem;
        width: 100%;
    }
    
    nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }
    
    nav a.active {
        border-bottom: none;
        background-color: rgba(37, 99, 235, 0.1);
        padding-right: 1rem;
        border-radius: 4px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    main {
        padding: 1rem;
        overflow-x: hidden;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Breadcrumb mobile fixes */
    .breadcrumb {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
        background: transparent;
        overflow-x: visible;
        overflow-y: visible;
    }
    
    .breadcrumb ol {
        gap: 0.25rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .breadcrumb li {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        flex: 0 1 auto;
        box-sizing: border-box;
    }
    
    .breadcrumb li:not(:last-child)::after {
        margin-right: 0.25rem;
        margin-left: 0.25rem;
        font-size: 0.9rem;
        flex-shrink: 0;
        display: inline-block;
    }
    
    .breadcrumb a,
    .breadcrumb span {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        display: inline-block;
        max-width: 100%;
        box-sizing: border-box;
        line-height: 1.4;
    }
    
    /* Alert boxes mobile fixes */
    .alert {
        padding: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .alert strong {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .disclaimer-box-subtle,
    .disclaimer-box {
        padding: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .disclaimer-box-subtle strong,
    .disclaimer-box strong {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .hero p {
        font-size: 0.95rem;
        word-wrap: break-word;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Lists */
ul, ol {
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Disclaimers */
.disclaimer-box {
    background: #fff3cd;
    border: 2px solid var(--warning);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.disclaimer-box strong {
    color: #92400e;
    display: block;
    margin-bottom: 0.5rem;
}

/* Tabs */
.tabs {
    display: flex !important;
    flex-wrap: nowrap;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    gap: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 100%;
}

.tab-button {
    display: block !important;
    visibility: visible !important;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    position: relative;
    bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    opacity: 1 !important;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.tdac-form {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
    min-height: auto; /* Let content determine height naturally */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    overflow-x: visible;
    overflow-y: visible;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    max-width: 100%;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    margin: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-right: 0.5rem;
    color: var(--text-light);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-light);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

