/* Modern Smart Notify Style - Refined & Branded (Strict V2) */
/* Color Palette & Fonts */
/* Primary Color: #ff942f (Orange) */
/* Dark Text: #333333 */
/* Light Background: #f9f9f9 */
/* copyright 2024 Smart Notify - All rights reserved */
/* project start: June 2024 */
/* last updated: Dec 2025 */
/* project version: 2.1.4 */
/* Programmer: A.Jalili */

:root {
    --primary-color: #ff942f; /* Original Orange */
    --primary-dark: #e07b22;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
    --font-main: 'Outfit', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --nav-height: 64px;
}

/* Fade helper for language changes */
.lang-fade {
    transition: opacity 0.7s ease !important;
}

/* Fade helper for language changes */
.lang-fade {
    transition: opacity 0.45s ease !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light); /* Original background */
    color: var(--text-dark);
    position: relative;
    
    
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography override for AI feel - HEADERS ONLY where appropriate, NOT BRAND */
h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
}

/* Glassmorphism Background - Replaces Stars (User requested Glassmorphism bg instead of stars, but "clear" header bg) */
#glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 20%, rgba(255, 148, 47, 0.05), transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(0, 102, 204, 0.05), transparent 60%);
    pointer-events: none;
}

/* Fixed header background element (keeps image fixed on mobile/tablet/desktop) */
#header-bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2; /* behind glass overlay (-1) and page content */
    background-image: url('img/1600x600.webp');
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

/* Lightweight comet canvas overlay */
#comet-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1040; /* above navbar but below modals */
}

/* comet controls removed (UI was deleted) */

/* Language Switcher */
.language-switcher-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1050;
}

/* Background audio controls removed; controls intentionally disabled */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

.language-switcher-container .btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    border-radius: 8px;
}

.language-switcher-container .dropdown-menu {
    background-color: var(--primary-color);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dropdown-item {
    color: white !important;
}

.dropdown-item:hover {
    background-color: var(--primary-dark);
    border-radius: 8px;
}

/* Header */
header {
    /* Header background moved to a fixed element (#header-bg-image) so mobile keeps it fixed */
    background: transparent;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeIn 2s ease-in-out forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* REMOVED OVERLAY to keep image clear as requested */
/* header::before { ... } */ 

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* RESTORED BRAND FONT & STYLE & LAYOUT */
.logo-and-title {
    display: flex; /* Backup used flex row */
    align-items: center;
    gap: 0;
    justify-content: center;
    margin-bottom: 10px;
    flex-direction: row;
}

/* Logo intro: scale up from small, rotate -360deg to 0 and fade in */
@keyframes logoIntro {
    0% {
        opacity: 0;
        transform: rotate(-360deg) scale(0.28);
    }
    50% {
        opacity: 1;
        transform: rotate(-180deg) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Apply the intro animation to logo+title container so image and text animate together */
.logo-and-title {
    transform-origin: center center;
}

.header-logo {
    height: 50px; /* Match Desktop Font Size approx (48px) */
    width: auto;
    margin-right: 10px; /* Spacing between logo and text */
    transform-origin: center center;
    will-change: transform, opacity;
    /* use linear timing for uniform rotation; overall effect remains smooth */
    animation: logoIntro 1.6s linear both;
}

.brand-with-tm {
    position: relative;
    display: inline-block;
}

.brand-name {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Brand text parts start hidden and will fade in sequentially after logo animation */
.brand-name .smart-text,
.brand-name .notify-text {
    display: inline-block;
    opacity: 0;
    transition: opacity 1.8s ease-out;
}

.brand-visible {
    opacity: 1 !important;
}

.smart-text { color: #0066cc; }
.notify-text { color: var(--primary-color); }

.trademark-symbol {
    position: absolute;
    top: -5px;
    right: -18px;
    font-size: 20px;
    color: #333;
    font-weight: 500;
    line-height: 1;
    /* vertical-align: super; REMOVED as backup used absolute position only */
}

/* Rotating Slogan - Restored from backup logic */
.rotating-slogan {
    font-size: 24px;
    font-weight: 300;
    color: #333;
    min-height: 35px;
    margin: 10px 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: relative; /* Backup had this */
    z-index: 5;
    display: block;
}

/* Powered-by branding (Corinthia) */
#powered-by p {
    font-family: 'Corinthia', cursive;
    font-size: clamp(28px, 6vw, 56px); /* responsive larger display */
    margin: 18px 0;
    color: var(--text-dark);
    line-height: 1;
    /* Slightly thinner appearance: reduce weight and remove heavy stroke/shadow */
    font-weight: 600;
    letter-spacing: 0;
    transform: scale(1.02) translateZ(0);
    -webkit-text-stroke: 0px transparent;
    text-shadow: none;
}

/* Prevent flash of unstyled font: hide until Corinthia is loaded */
/* Powered-by initial state: hidden via opacity so fade-in/out works reliably on scroll */
#powered-by p {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 420ms ease, transform 420ms cubic-bezier(0.22,1,0.36,1);
}

/* When the powered section is in view, fade in like other elements */
#powered-by.powered-inview p {
    opacity: 1;
    transform: translateY(0);
}

/* make the powered-by text orange */
#powered-by p { color: var(--primary-color); }

/* Navbar */
.navbar {
    background-color: #ff942f; /* Solid orange as original, or slightly transparent if glass desired? User said "Clear background" for header image, implying less overlays. */
    /* Let's keep it solid or slightly glassy but maintaining distinct orange */
    background-color: rgba(255, 148, 47, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.nav-link {
    color: white !important;
    font-size: 18px; /* Original size */
    transition: color 0.3s ease;
    margin: 0 10px;
}

.nav-link:hover {
    color: #f0f0f0 !important;
}

/* Ensure collapsed navbar (mobile/tablet) has solid background so links are readable */
@media (max-width: 767.98px) {
    .navbar {
        position: relative;
    }

    .navbar-collapse {
        background-color: rgba(255,148,47,0.98);
        padding: 0.5rem 0.75rem;
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
        display: inline-block; /* shrink to content width */
        width: auto;
        max-width: calc(100% - 2rem);
        position: absolute;
        left: 0.75rem; /* align under the toggler on left */
        right: auto;
        top: calc(var(--nav-height) + 6px);
        border-radius: 8px;
    }

    .navbar-collapse .nav-link {
        color: #fff !important;
        padding: 0.35rem 0.5rem;
        white-space: nowrap;
    }

    /* ensure collapse doesn't force full-width block layout when shown */
    .navbar-collapse.collapse {
        display: none;
    }
    .navbar-collapse.collapse.show {
        display: inline-block;
    }
}

/* Keep collapsed behavior for very small screens only; on tablet (>=768) navbar stays expanded */

/* Features Section */
section {
    padding: 60px 20px;
    z-index: 2;
}

/* Modern Card Style - Uniform Size & Spacing */
.feature {
    background: rgba(255, 255, 255, 0.7); /* Glassy white */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px; /* Softer corners */
    padding: 30px;
    /* margin: 15px; REMOVED margin to let grid handle spacing */
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05); /* Soft modern shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* ENFORCE UNIFORM HEIGHT */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Justify content if needed, but top alignment usually best for cards */
    
    /* Animation Initial State: use transitions so adding/removing .visible animates both ways */
     opacity: 0;
     transform: translateY(40px);
     transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                     transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure title selector works even if other rules conflict */
[data-lang-key="featuresSectionTitle"] {
    transform: translateX(-140px);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 2.4s ease;
    will-change: transform, opacity;
}

[data-lang-key="featuresSectionTitle"].section-title-visible {
    transform: translateX(0);
    opacity: 1;
}

/* Navbar: start hidden while header is visible, fade/slide in when needed */
.navbar {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.45s linear, transform 0.45s linear;
    pointer-events: none; /* disable interactions when hidden */
}

.navbar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Features section title entrance from left */
#features h2 {
    transform: translateX(-140px);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 2.4s ease;
    will-change: transform, opacity;
}

.section-title-visible {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 2.4s ease !important;
    will-change: transform, opacity;
}

/* Stronger selector to ensure visible class wins over #features h2 defaults */
#features h2.section-title-visible {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 2.4s ease !important;
}

.feature:hover {
    transform: translateY(-10px) scale(1.02); /* Works after animation fills, but might conflict. Use !important or check precedence. */
    box-shadow: 0 15px 40px rgba(255, 148, 47, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
}

/* Fix for conflict between hover transform and fill-mode forwards */
.feature.visible:hover {
    transform: translateY(-10px) scale(1.02);
}

.feature img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: none; /* No drop shadow as requested implicitly by "clear" */
}

.feature h3 {
    margin-bottom: 1rem;
    color: #222;
    font-size: 1.5rem; /* Standardize */
}

.feature p {
    color: #666;
    font-size: 1rem;
    flex-grow: 1; /* Pushes content to fill space if needed */
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    height: var(--nav-height);
    margin-top: 50px;
    display: flex;
    align-items: center;
    width: 100%;
    /* start hidden; will fade in when visible */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Rounded footer edges (all corners) */
footer {
    border-radius: 12px; /* round all corners */
    overflow: hidden; /* ensure inner content respects rounding */
}

footer.footer-visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-phone {
    color: white;
    font-weight: 700;
    text-decoration: none;
}

/* Make footer container full width inside footer */
footer .container-fluid {
    width: 95%;
    margin: 0 auto;
   /* padding-left: 0;
    padding-right: 0; */
}

/* ImmuniWeb certificate inside footer: center without changing footer height */
footer {
    position: relative; /* enable absolute centering inside */
}

.footer-cert {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    pointer-events: auto;
}

.footer-cert img,
.footer-cert .footer-cert-fallback {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(var(--nav-height) - 12px); /* keep badge smaller than footer height */
    height: auto;
    vertical-align: middle;
}

.footer-cert .footer-cert-fallback {
    display: none !important; /* default hidden; JS will toggle when needed */
    box-sizing: content-box;
}

@media (max-width: 768px) {
    /* on small screens footer stacks; keep cert inline and not absolute to avoid overlap */
    .footer-cert {
        position: static;
        transform: none;
        margin: 6px 0;
    }
    .footer-cert img {
        max-height: 48px;
    }
}

/* Make phone look like plain text but remain clickable */
.footer-phone {
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.footer-phone:hover,
.footer-phone:focus {
    text-decoration: none;
    opacity: 0.95;
}

/* Modal Styles */
.modal-content.glass-modal-content {
    background: rgba(255, 255, 255, 0.95); /* Less transparent for readability */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border-radius: 15px; /* Rounded per original request */
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-title {
    color: var(--primary-color); /* Branding */
    font-weight: 700;
}

/* Typing Cursor - Restored Original Style */
#aboutUsContentContainer p.about-text,
#contactUsContentContainer p.contact-text {
    border-right: .15em solid orange; /* Cursor */
    animation: blink-caret .75s step-end infinite;
    margin-bottom: 0;
}

#aboutUsContentContainer p.about-text.typing-complete,
#contactUsContentContainer p.contact-text.typing-complete {
    border-right: none;
    animation: none;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange; }
}

/* Responsive */
@media (max-width: 768px) {
    .brand-name { font-size: 32px; }
    .header-logo { height: 34px; } /* Proportional to 32px font */
    header h1 { font-size: 30px; }
    
    /* Fix for iOS background image missing due to attachment:fixed */
    header {
        background-attachment: scroll;
    }
    
    /* Responsive Slogan: Ensure it fits on one line but isn't too small */
    .rotating-slogan {
        font-size: 18px; /* Increased from 16px */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 95%; /* More width */
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .brand-name { font-size: 28px; }
    .header-logo { height: 30px; } /* Proportional to 28px font */
    /* Fix for iOS background image missing due to attachment:fixed */
    header {
        background-attachment: scroll;
    }
    .rotating-slogan {
        font-size: 4.5vw; /* Responsive scaling, approx 17-19px on most phones */
        /* max-font-size removed (invalid property) */
        max-width: 100%;
    }

    /* Footer: denser stacked text on small screens and tablets */
    footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* increase vertical padding on mobile so text isn't too close to orange edge */
        padding: 14px 12px;
        height: auto; /* allow content-driven height on small screens */
        gap: 8px;
    }

    footer .container-fluid {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding-left: 12px;
        padding-right: 12px;
    }

    footer .footer-left-content p,
    footer .footer-right-content p {
        line-height: 1.12;
        margin-bottom: 0.25rem;
        font-size: 0.95rem;
        text-align: center;
    }
}

/* Slightly larger "Powered by" on mobile for readability */
@media (max-width: 768px) {
    #powered-by p {
        font-size: clamp(30px, 7vw, 46px);
    }
}
/* Media Hub Image - Global Style */
.media-hub-img {
    border-radius: 12px !important;
    width: 100%;
    height: auto;
}

/* Media Hub Card Adjustments for Desktop */
@media (min-width: 768px) {
    .media-hub-card {
        /* Match other feature cards exactly */
        padding: 30px !important;
        min-height: auto !important;
    }
    .media-hub-img {
        height: auto !important;
        object-fit: cover;
        object-position: center;
        margin-bottom: 10px !important;
        border-radius: 12px !important;
    }
    .media-hub-card h3 {
        font-size: 1.35rem !important;
        margin-bottom: 0.5rem !important;
    }
    .media-hub-card p {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }
}
