/* 
   Modern.css - Refonte Dizziunariu Corsu 2025 
   Palette: Ocre/Terre, Maquis, Mer, Fond clair
*/

:root {
    /* Colors */
    --color-primary: #3A6342;
    /* Maquis / Natural Green */
    --color-primary-hover: #2C4C32;
    --color-secondary: #5C80A6;
    /* Mare / Mediterranean Blue */
    --color-secondary-hover: #4A6B8A;
    --color-accent: #5C80A6;
    /* Light Azure / Freshness */
    --color-accent-light: #F0F9FF;

    --color-bg: #FAF9F6;
    /* Warm Off-white */
    --color-bg-card: rgba(255, 255, 255, 0.85);
    --color-bg-input: rgba(255, 255, 255, 0.9);

    --color-text: #1F2937;
    /* Dark Charcoal/Slate */
    --color-text-muted: #64748B;
    --color-text-light: #F8FAFC;

    --color-border: #E2E8F0;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Background Image for larger screens only */
@media (min-width: 768px) {
    body {
        background-image:
            linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.95)),
            url('../images/armoiries.png');
        background-repeat: no-repeat, no-repeat;
        background-position: center, center -200px;
        background-attachment: fixed, scroll;
        background-size: cover, 120%;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility: Focus Rings */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.25;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utility Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-section {
    text-align: center;
    padding: 10rem 1rem 6rem;
    background-color: transparent;
    margin-bottom: 2rem;
}

/* Header & Nav */
.navbar {
    /* Safe Area Support */
    padding-top: env(safe-area-inset-top);
    height: calc(var(--header-height) + env(safe-area-inset-top));
    background-color: var(--color-bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Burger Menu (Mobile) */
.burger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: var(--font-heading);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Cards */
.card {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* Forms & Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-input);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(192, 92, 53, 0.1);
}

/* Footer */
footer {
    background-color: var(--color-accent);
    color: white;
    padding: 4rem 2rem;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    margin-top: auto;
}

footer p {
    text-align: center;
    opacity: 0.8;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--color-bg-card);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* Full w on mobile */
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 2rem;
        border-top: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
}