/* Custom CSS additions */
/* Base Font Settings */
body {
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Montserrat', sans-serif;
}

.nav-link {
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.hero-image {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.vision-card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* Ant Design-inspired transitions */
.button-transition {
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Form focus states */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(144, 20, 60, 0.2);
    outline: none;
}

/* Card hover effect */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px -4px rgba(0,0,0,0.1);
}

/* Sinhala language specific styles */
[lang="si"] body {
    font-family: 'Noto Sans Sinhala', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

[lang="si"] h1, [lang="si"] h2, [lang="si"] h3 {
    font-family: 'Noto Sans Sinhala', sans-serif;
    line-height: 1.4;
    letter-spacing: 0;
    font-weight: 700;
}

/* Adjust spacing for Sinhala text */
[lang="si"] .text-4xl {
    line-height: 1.3;
}

[lang="si"] p {
    line-height: 2;
}

/* Fix hero section alignment for Sinhala */
[lang="si"] .hero-heading {
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    [lang="si"] .hero-heading {
        text-align: left;
    }
}

[lang="si"] .hero-heading span {
    display: inline-block;
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    [lang="si"] .hero-heading span {
        text-align: left;
    }
}

[lang="si"] .hero-description {
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    [lang="si"] .hero-description {
        text-align: left;
    }
}

[lang="si"] .hero-buttons {
    align-items: center;
}

@media (min-width: 768px) {
    [lang="si"] .hero-buttons {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

/* Improve button text alignment for Sinhala */
[lang="si"] button span {
    display: inline-block;
}

/* Adjust form labels for Sinhala */
[lang="si"] label {
    line-height: 1.6;
}

/* Video background */
video {
    filter: brightness(0.98);
    transform: scale(1.01); /* Fixes slight border gaps */
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Political candidate specific styles */
.hero-title {
    letter-spacing: -0.02em;
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #90143c;
}

/* Enhance buttons for political feel */
.btn-primary {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Facebook Embed Overrides */
.fb-page, 
.fb-page span, 
.fb-page iframe,
.fb_iframe_widget,
.fb_iframe_widget span,
.fb_iframe_widget iframe {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    transform-origin: none !important;
}

.fb_iframe_widget iframe {
    position: relative !important;
    height: 700px !important;
    width: 100% !important;
}

/* Ensure the container takes full width */
/* #news .w-full {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
} */

/* Ensure the absolute positioned div takes full width */
/* #news .absolute {
    width: 100vw !important;
    height: 700px !important;
} */

/* Hero section styles */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-content {
        align-items: flex-start;
    }
}

.hero-heading {
    width: 100%;
    text-align: center;
}

.hero-title-wrapper {
    display: inline-block;
    width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-heading {
        text-align: left;
    }
    
    .hero-title-wrapper {
        text-align: left;
    }
}

.hero-description {
    text-align: center;
}

@media (min-width: 768px) {
    .hero-description {
        text-align: left;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

/* Fix hero section alignment for Sinhala */
[lang="si"] .hero-heading {
    text-align: center;
    width: 100%;
}

[lang="si"] .hero-title-wrapper {
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    [lang="si"] .hero-heading {
        text-align: left;
    }
    
    [lang="si"] .hero-title-wrapper {
        text-align: left;
    }
}

.lang-switcher a.active {
    font-weight: bold;
    text-decoration: underline;
}

/* Language-specific line heights */
[lang="ta"] p, [lang="si"] p {
    line-height: 1.8;
}

/* Force text direction for Tamil */
[lang="ta"] {
    direction: ltr; /* Tamil works best with LTR direction */
}

/* Better font handling for complex scripts */
[lang="si"] {
    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 1.05em;
}

[lang="ta"] {
    font-family: 'Noto Sans Tamil', sans-serif;
    font-size: 1.05em;
}

/* Error handling visualization */
.translation-missing {
    /* Remove the red outline */
    /* outline: 2px solid red !important; */
}

/* Update language switcher styles */
.lang-btn {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Noto Sans Sinhala', 'Noto Sans Tamil', sans-serif;
}

.lang-btn.active {
    background-color: #90143c20;
    color: #90143c;
    font-weight: 600;
}

.lang-btn:not(.active):hover {
    background-color: #f8f9fa;
}

/* Error states */
[data-i18n-missing] {
    outline: 2px solid #ff000040;
}

/* Add missing translation indicators */
[data-i18n]:empty::after {
    content: "⚠ Translation missing";
    color: #ef4444;
    font-size: 0.8em;
    display: inline-block;
    margin-left: 0.5em;
}

/* Language-specific typography */
[lang="ta"] {
    font-family: 'Noto Sans Tamil', sans-serif;
    line-height: 1.8;
}

[lang="si"] {
    font-family: 'Noto Sans Sinhala', sans-serif;
    line-height: 1.8;
}

/* Loading indicator */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-out;
}

#page-loader.fade-out {
    opacity: 0;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 1rem;
}

.lang-switcher a {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #4b5563;
    transition: all 0.2s ease;
}

.lang-switcher a:hover {
    background-color: #f3f4f6;
}

.lang-switcher a.active {
    background-color: #90143c;
    color: #ffffff;
}

/* Font styles for different languages */
.lang-si {
    font-family: 'Noto Sans Sinhala', sans-serif;
}

.lang-ta {
    font-family: 'Noto Sans Tamil', sans-serif;
}

.lang-en {
    font-family: 'Open Sans', sans-serif;
} 