/* Ensure main takes at least full viewport height minus header */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    min-height: calc(100vh - 4rem);
    /* 4rem = header height on mobile */
}

@media (min-width: 1024px) {
    main {
        min-height: calc(100vh - 5rem);
        /* 5rem = header height on desktop */
    }
}

/* Custom styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animation */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.mobile-menu.open {
    max-height: 500px;
}

/* Dropdown styles */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language dropdown */
.lang-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hamburger animation */
.hamburger-line {
    transition: all 0.3s ease;
}

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

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

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

/* Footer styles */
.footer-link {
    position: relative;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #60a5fa;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.g-recaptcha{
    display: flex;
    justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Bootstrap-like form validation (contact form & reusable elsewhere) */
/* Add `is-invalid` to an input/textarea and place an `.invalid-feedback`
   element right after it; the message reveals only while the field is
   invalid. Mirrors Bootstrap's form-control validation look. */
/* ------------------------------------------------------------------ */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #dc2626;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Red border + red focus ring; !important to override the Tailwind
   focus:ring utilities already on these inputs. */
.is-invalid,
.is-invalid:focus {
    border-color: #dc2626 !important;
}

.is-invalid:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}

/* Keep the validation shake short (animate.css plays it once, not infinite).
   Scoped to invalid fields so other animate.css usages are unaffected. */
.is-invalid.animate__animated {
    --animate-duration: 0.6s;
}