.about-safae {
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
}

.about-safae__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #253839;
}

.about-safae__content {
    position: relative;
    width: 100%;
    height: 100dvh;
    max-width: 1920px;
    margin: 0 auto;
    padding: clamp(2rem, 5dvw, 5rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5dvw, 5rem);
    align-items: center;
}

.about-safae__text-container {
    max-width: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.about-safae__title {
    margin-bottom: clamp(2rem, 4dvh, 3rem);
}

.about-safae__title-main {
    display: block;
    color: #DCB77C;
    font-family: 'Alata', sans-serif;
    font-size: clamp(2.5rem, 5vw, 96px);
    font-weight: 400;
    line-height: 1.2;
    transform: translateY(20px);
}

.about-safae__title-name {
    display: block;
    color: #DCB77C;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: clamp(2.5rem, 5vw, 96px);
    font-weight: 800;
    line-height: 1.2;
    margin-top: clamp(0.5rem, 2vh, 1.5rem);
    transform: translateY(20px);
}

.about-safae__description {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
    opacity: 0;
    transform: translateY(20px);
    max-height: calc(100vh - 250px);
}

.about-safae__description-content {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.5vw, 26px);
    font-weight: 400;
    line-height: 1.6;
}

.about-safae__description p {
    margin-bottom: 1.5em;
}

.about-safae__description p:last-child {
    margin-bottom: 0;
}

.about-safae__image-container {
    position: relative;
    width: 100%;
    height: 80vh;
    opacity: 0;
    transform: translateX(50px);
}

.about-safae__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(220, 183, 124, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(220, 183, 124, 0.3);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 183, 124, 0.5);
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 183, 124, 0.5) rgba(220, 183, 124, 0.1);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-slide-in {
    animation: fadeSlideIn 1s ease-out forwards;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .about-safae__content {
        grid-template-columns: 1fr;
        gap: 2rem;
        height: 100dvh;
        overflow-y: hidden;
    }

    .about-safae__text-container {
        height: 50vh;
    }

    .about-safae__image-container {
        order: -1;
        max-height: 40vh;
    }

    .about-safae__description {
        max-height: calc(100% - 150px);
    }
}

@media screen and (max-width: 768px) {
    .about-safae__content {
        padding: clamp(1.5rem, 3dvw, 2rem);
    }

    .about-safae__title-main {
        font-size: clamp(2rem, 8vw, 32px);
    }

    .about-safae__title-name {
        font-size: clamp(2rem, 8vw, 36px);
    }

    .about-safae__description-content {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }

    .about-safae__text-container {
        height: 55vh;
    }

    .about-safae__image-container {
        max-height: 35vh;
    }
}

@media screen and (max-width: 480px) {
    .about-safae__text-container {
        height: 60vh;
    }

    .about-safae__image-container {
        max-height: 30vh;
    }
}
/* Specific viewport adjustments */
@media screen and (min-width: 1024px) and (max-width: 1280px) and (min-height: 720px) and (max-height: 960px) {
    .about-safae__content {
        gap: clamp(1.5rem, 3dvw, 2rem);
    }

    .about-safae__text-container {
        max-width: 600px;
    }

    .about-safae__title {
        margin-bottom: clamp(1.5rem, 3dvh, 2rem);
    }

    .about-safae__title-main,
    .about-safae__title-name {
        font-size: clamp(2rem, 4vw, 72px);
    }

    .about-safae__description-content {
        font-size: clamp(0.9rem, 1.2vw, 20px);
    }

    .about-safae__image-container {
        max-height: 70vh;
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    .about-safae {
        height: -webkit-fill-available;
    }

    .about-safae__description {
        -webkit-overflow-scrolling: touch;
    }

    .about-safae__text-container {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
    }
}

/* Extra adjustments for specific landscape modes */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    .about-safae__content {
        grid-template-columns: 1fr 1fr;
        height: auto;
        min-height: 100dvh;
        align-items: start;
        padding: clamp(1.5rem, 3dvw, 2.5rem);
    }

    .about-safae__text-container {
        height: calc(100dvh - clamp(3rem, 6dvw, 5rem));
    }

    .about-safae__image-container {
        order: 1;
        height: calc(100dvh - clamp(3rem, 6dvw, 5rem));
        max-height: none;
    }
}

/* Taller screens */
@media screen and (min-height: 1000px) {
    .about-safae__description-content {
        font-size: clamp(1.1rem, 1.3vw, 24px);
    }

    .about-safae__title {
        margin-bottom: clamp(2.5rem, 5dvh, 4rem);
    }
}

/* Ultra-wide screens */
@media screen and (min-width: 1921px) {
    .about-safae__content {
        max-width: 1800px;
    }

    .about-safae__text-container {
        max-width: 900px;
    }

    .about-safae__description-content {
        font-size: clamp(1.2rem, 1.4vw, 28px);
    }
}

/* Small height screens */
@media screen and (max-height: 600px) {
    .about-safae__content {
        padding: clamp(1rem, 2dvw, 1.5rem);
    }

    .about-safae__title {
        margin-bottom: clamp(1rem, 2dvh, 1.5rem);
    }

    .about-safae__title-main,
    .about-safae__title-name {
        font-size: clamp(1.8rem, 3.5vw, 28px);
    }

    .about-safae__description-content {
        font-size: clamp(0.8rem, 1.1vw, 16px);
    }
}

/* Ensure smooth scrolling across all devices */
@media (prefers-reduced-motion: no-preference) {
    .about-safae__description {
        scroll-behavior: smooth;
    }
}

/* Print styles */
@media print {
    .about-safae {
        height: auto;
        overflow: visible;
    }

    .about-safae__description {
        overflow: visible;
    }

    .about-safae__content {
        display: block;
    }

    .about-safae__image-container {
        page-break-before: always;
    }
}
@media screen and (min-width: 1025px) {
    .about-safae__content {
        overflow: hidden;
        align-items: center;
    }

    .about-safae__text-container {
        height: 80vh;
        overflow: hidden;
    }

    .about-safae__description {
        padding-right: 1.5rem;
        margin-right: -0.5rem;
    }

    .about-safae__image-container {
        align-self: center;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Add these RTL rules at the end of your CSS file */
[dir="rtl"] .about-safae__title-main,
[dir="rtl"] .about-safae__title-name,
[dir="rtl"] .about-safae__description {
    text-align: right;
}

[dir="rtl"] .about-safae__description {
    direction: rtl;
}

@media screen and (min-width: 1025px) {
    [dir="rtl"] .about-safae__content {
        direction: rtl;
    }
    
    [dir="rtl"] .about-safae__image-container {
        transform: translateX(-50px);
    }
}

[dir="rtl"] @keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}