/* RTL Support for Hebrew */
[dir="rtl"] {
    text-align: right;
}

/* Ensure Hebrew fonts load properly */
body, .navbar, .btn {
    font-family: 'Rubik', 'Segoe UI', 'Arial Unicode MS', sans-serif !important;
}

/* Custom styles for OAdmin */
.hero-section {
    background: white url('/img/2021/11/hero-background.png');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    color: #333;
    display: flex;
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 60px;
    position: relative;
}

/* Show the hero section image again */
.hero-section .col-lg-6:last-child {
    display: block;
}

/* Restore normal column widths */
.hero-section .col-lg-6:first-child {
    max-width: 50%;
    flex: 0 0 50%;
}

.hero-title {
    font-family: 'Karantina', sans-serif;
    font-size: 150px;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 1.2px;
    color: #383DC1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background: transparent !important;
}

.hero-animated {
    font-family: 'Karantina', sans-serif;
    font-size: 115px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 1.2px;
    color: #FFBA00;
}

.btn-primary-custom {
    background-color: #FFBA00;
    border-color: #FFBA00;
    color: #383DC1;
    font-weight: 500;
    font-family: 'Rubik', sans-serif !important;
}

.btn-primary-custom:hover {
    background-color: #e6a600;
    border-color: #e6a600;
    color: #383DC1;
}

.btn-whatsapp {
    background-color: #00E676;
    border-color: #00E676;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #00c863;
    border-color: #00c863;
    color: white;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 240px;
    perspective: 1000px;
    margin-bottom: 20px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0px 0px 18px 3px rgba(131, 131, 131, 0.17);
}

.flip-card-front {
    background-color: #ffffff;
    color: #383DC1;
}

.flip-card-back {
    background-color: #383DC1;
    color: white;
    transform: rotateY(180deg);
}

.flip-card-icon {
    font-size: 60px;
    margin-bottom: 15px;
    color: #383DC1;
}

.flip-card-back .flip-card-icon {
    color: white;
}

.section-title {
    color: #FFBA00;
    font-family: 'Karantina', sans-serif;
    font-size: 70px;
    font-weight: 400;
    line-height: 1em;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
}

.price-card {
    border: none;
    border-radius: 10px;
    box-shadow: 5px 6px 26px 0px rgba(72, 72, 72, 0.31);
    margin-bottom: 60px;
}

.price-header {
    background: linear-gradient(135deg, #383DC1 0%, #FFBA00 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px 10px 0 0;
}

.price-amount {
    font-size: 50px;
    font-weight: 400;
    color: #383DC1;
    margin: 40px 0;
}

.price-currency {
    font-size: 25px;
    vertical-align: top;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.price-features li {
    padding: 10px 0;
    border-bottom: 1px dotted #ddd;
    text-align: right;
}

.price-features li:last-child {
    border-bottom: none;
}

.navbar-custom {
    background-color: white;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.14);
}

.navbar-brand img {
    height: 55px;
}

.navbar-nav .nav-link {
    color: #383DC1 !important;
    font-weight: 400;
    margin: 0 12px;
    font-family: 'Rubik', sans-serif !important;
}

.navbar-nav .nav-link:hover {
    color: #FFBA00 !important;
}

.footer {
    background-color: #f2f2f2;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-link {
    color: #545454;
    text-decoration: none;
    font-size: 14px;
}

.footer-link:hover {
    color: #383DC1;
    text-decoration: none;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.zoom-in {
    animation: zoomIn 0.8s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Remove any potential focus outlines and frames from all elements */
h1, h2, h3, h4, h5, h6, .hero-title, .hero-animated, .section-title {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background: transparent !important;
}

/* Ensure no unwanted styling on zoom-in animation */
.zoom-in h1, .zoom-in .hero-title {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 80px;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    .hero-animated {
        font-size: 80px;
    }
    
    .section-title {
        font-size: 40px;
    }
    
    .hero-section {
        background-image: url('/img/2021/11/mobile-hero-bg.png');
        background-size: contain;
        background-position: center top;
        background-repeat: no-repeat;
        text-align: center;
        padding-top: 250px;
        min-height: 100vh;
    }
    
    /* Fix mobile text layout - make columns full width */
    .hero-section .col-lg-6:first-child {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Hide the image column on mobile to prevent layout issues */
    .hero-section .col-lg-6:last-child {
        display: none;
    }
    
    /* Push content below the background image */
    .hero-section .zoom-in {
        margin-top: 50px;
        position: relative;
        z-index: 10;
    }
    
    /* Better text formatting for mobile */
    .hero-section .lead {
        background: rgba(255, 255, 255, 0.9);
        padding: 15px;
        border-radius: 8px;
        color: #333;
        margin: 20px 0;
        position: relative;
        z-index: 10;
        font-size: 18px; /* Increased from 16px */
        line-height: 1.6; /* Better line spacing */
        text-align: right; /* RTL for Hebrew */
        max-width: 100%;
        word-wrap: break-word;
        font-weight: 400; /* Slightly bolder for better readability */
    }
    
    /* Adjust buttons for mobile - ensure they're above background */
    .hero-section .btn {
        font-size: 16px;
        padding: 12px 20px;
        margin: 5px;
        display: inline-block;
        width: auto;
        min-width: 150px;
        position: relative;
        z-index: 10;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Better spacing for mobile buttons with background clearing */
    .hero-section .d-flex.flex-wrap {
        justify-content: center;
        gap: 15px !important;
        padding: 20px;
        margin-top: 20px;
        position: relative;
        z-index: 10;
        max-width: 100%;
    }
    
    /* Style the hero title for better readability on mobile */
    .hero-section .hero-title {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        margin-bottom: 20px;
        position: relative;
        z-index: 10;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    .hero-section .hero-animated {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        margin-bottom: 20px;
        position: relative;
        z-index: 10;
        text-align: center;
        max-width: 100%;
    }
    
    /* Ensure container has proper mobile padding */
    .hero-section .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Fix row gutters on mobile */
    .hero-section .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}


/* ── Legacy content pages ── */
.legacy-content {
    font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    direction: rtl;
    text-align: right;
}

.legacy-content h1 {
    font-family: 'Karantina', sans-serif;
    font-size: 60px;
    font-weight: 400;
    color: #FFBA00;
    line-height: 1.1;
    margin-bottom: 24px;
}

.legacy-content h2 {
    font-family: 'Karantina', sans-serif;
    font-size: 40px;
    font-weight: 400;
    color: #383DC1;
    line-height: 1.1;
    margin-top: 36px;
    margin-bottom: 16px;
}

.legacy-content h3,
.legacy-content h4 {
    color: #383DC1;
    margin-top: 28px;
    margin-bottom: 12px;
}

.legacy-content p {
    margin-bottom: 16px;
}

.legacy-content a {
    color: #383DC1;
    text-decoration: underline;
}

.legacy-content a:hover {
    color: #FFBA00;
}

.legacy-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.legacy-content img.left {
    float: right;
    margin: 0 0 16px 24px;
}

.legacy-content img.right {
    float: left;
    margin: 0 24px 16px 0;
}

.legacy-content ul,
.legacy-content ol {
    padding-right: 24px;
    padding-left: 0;
    margin-bottom: 16px;
}

.legacy-content li {
    margin-bottom: 6px;
}

.legacy-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 15px;
}

.legacy-content table td,
.legacy-content table th {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
}

.legacy-content table th {
    background-color: #383DC1;
    color: white;
}

.legacy-content table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.legacy-content strong, .legacy-content b {
    color: #383DC1;
}

.legacy-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ── Legacy navbar back-link ── */
.legacy-nav-back {
    color: #383DC1 !important;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid #383DC1;
    border-radius: 4px;
    padding: 4px 10px;
    margin-right: 8px;
    transition: background 0.2s, color 0.2s;
}

.legacy-nav-back:hover {
    background: #383DC1;
    color: #ffffff !important;
}

/* ── Legacy sidebar ── */
.legacy-sidebar {
    position: sticky;
    top: 70px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border-right: 3px solid #383DC1;
}

.legacy-sidebar-title {
    color: #383DC1;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.legacy-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legacy-sidebar-nav li a {
    display: block;
    padding: 4px 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.legacy-sidebar-nav li a:hover {
    background: #383DC1;
    color: white;
    text-decoration: none;
}

.legacy-sidebar-section {
    font-size: 11px;
    font-weight: 700;
    color: #FFBA00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 8px 2px;
}


/* Extra small devices - phones */
@media (max-width: 576px) {
    .hero-title {
        font-size: 60px !important;
        text-align: center !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    .hero-animated {
        font-size: 60px !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    
    .section-title {
        font-size: 35px !important;
    }
    
    /* Ensure hero section has proper spacing to move content below image */
    .hero-section {
        padding-top: 200px !important;
        background-position: center top !important;
        min-height: 100vh !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Better text container for very small screens */
    .hero-section .lead {
        font-size: 16px !important; /* Increased from 14px */
        line-height: 1.5 !important; /* Better line spacing */
        padding: 15px !important; /* More padding */
        margin: 15px 0 !important;
        text-align: right !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        font-weight: 400 !important; /* Slightly bolder for better readability */
    }
    
    /* Push content container even further down on very small screens */
    .hero-section .zoom-in {
        margin-top: 80px !important;
        padding: 0 10px !important;
        max-width: 100% !important;
    }
    
    /* Make buttons stack vertically on very small screens */
    .hero-section .d-flex.flex-wrap {
        flex-direction: column;
        align-items: center;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 10px;
        padding: 20px;
        margin: 20px 10px;
        position: relative;
        z-index: 10;
        max-width: calc(100% - 20px) !important;
    }
    
    .hero-section .btn {
        width: 90%;
        max-width: 280px;
        margin: 8px 0;
        position: relative;
        z-index: 10;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Adjust container padding on mobile */
    .hero-section .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure hero section has enough top padding to clear background */
    .hero-section {
        padding-top: 120px !important;
        background-position: center top !important;
    }
    
    /* Better mobile column handling */
    .hero-section .col-lg-6:first-child {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Custom button animations */
.btn-3d {
    perspective: 1000px;
    position: relative;
    outline: none;
    text-decoration: none;
    display: inline-block;
}

.btn-3d span {
    position: relative;
    display: inline-block;
    background: #383DC1;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    transition: transform 0.3s;
    transform-origin: 50% 0;
    transform-style: preserve-3d;
}

.btn-3d span::before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #5d99c6;
    content: attr(data-hover);
    border-radius: 5px;
    transition: background 0.3s;
    transform: rotateX(-90deg);
    transform-origin: 50% 0;
}

.btn-3d:hover span,
.btn-3d:focus span {
    transform: rotateX(90deg) translateY(-22px);
}

.btn-3d:hover span::before,
.btn-3d:focus span::before {
    background: #383DC1;
}

/* Mobile Responsive Improvements for Components */
@media (max-width: 768px) {
    /* Flip cards - reduce height on mobile */
    .flip-card {
        height: 200px;
        margin-bottom: 15px;
    }
    
    .flip-card-icon {
        font-size: 45px;
    }
    
    .flip-card-front h5,
    .flip-card-back p {
        font-size: 14px;
    }
    
    /* Pricing card - better mobile spacing */
    .price-card {
        margin-bottom: 30px;
    }
    
    .price-amount {
        font-size: 40px;
        margin: 20px 0;
    }
    
    .price-header h3 {
        font-size: 20px;
    }
    
    /* Footer - stack columns properly */
    .footer .col-md-4 {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer .d-flex {
        flex-direction: column;
   align-items: center;
    }
    
    /* Navbar - better mobile menu */
    .navbar-nav .nav-link {
        margin: 8px 0;
        padding: 10px 15px;
    }
    
  /* 3D button - disable animation on mobile for performance */
    .btn-3d:hover span,
    .btn-3d:focus span {
    transform: none;
    }
}

@media (max-width: 576px) {
    /* Very small screens - further adjustments */
    .flip-card {
        height: 180px;
    }
    
    .flip-card-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }
  
    .price-amount {
        font-size: 35px;
    }
    
    .price-features {
        margin: 20px 0;
        font-size: 14px;
    }
}

/* Hebrew text fixes */
.hebrew-text {
    font-family: 'Rubik', 'Segoe UI', 'Arial Unicode MS', sans-serif !important;
 direction: rtl;
    unicode-bidi: bidi-override;
}

/* Style the Blazor error UI to be less intrusive */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: #721c24;
    text-decoration: none;
    font-weight: bold;
}

#blazor-error-ui .reload {
    color: #721c24;
    text-decoration: underline;
  margin-right: 1rem;
}

/* KEEP SMOOTH SCROLLING FOR ANCHOR LINKS - Don't override this */
html {
    scroll-behavior: smooth;
}

/* Fix anchor link positioning to account for fixed navbar */
#price {
  scroll-margin-top: 80px; /* Adjust for navbar height */
}

/* Alternative method using pseudo-element for better browser support */
#price::before {
    content: "";
    display: block;
    height: 80px; /* Height of your navbar */
    margin-top: -80px;
    visibility: hidden;
}

/* CSS Logical Properties for Better RTL Support */
.navbar-nav .nav-link {
    margin-inline: 12px; /* Better RTL support than margin: 0 12px */
}

.flip-card-icon {
    margin-block-end: 15px; /* Better than margin-bottom for RTL */
}

/* Accessibility Improvements */
.flip-card:focus-within {
    outline: 2px solid #383DC1;
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid #FFBA00;
    outline-offset: 2px;
}

/* Prevent z-index conflicts with modals */
.position-fixed.d-none.d-lg-block {
    z-index: 1040; /* Below Bootstrap modals (1055) */
}

/* Image fallback styling */
img {
    max-width: 100%;
    height: auto;
}

img[alt]:not([src]),
img[src=""]:after {
    content: "?? " attr(alt);
    display: block;
    padding: 20px;
    background: #f0f0f0;
    text-align: center;
    color: #666;
}