/* Mobile-First Styles for GrineGóra */
:root {
    /* Accessibility Focus */
    --focus-outline: 3px solid #005fcc;
    --focus-outline-offset: 2px;
    --primary-color: #2e7d32;
    --primary-light: #60ad5e;
    --primary-dark: #005005;
    --text-color: #333;
    --text-light: #666;
    --background: #ffffff;
    --background-alt: #f5f5f5;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-button:hover,
.mobile-menu-button:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.menu-icon {
    display: block;
    width: 24px;
    position: relative;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--text-color);
    left: 0;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

/* Active state for menu button */
.mobile-menu-button[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.mobile-menu-button[aria-expanded="true"] .menu-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-button[aria-expanded="true"] .menu-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Main Menu */
.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    /* Ensure minimum touch target size */
    a, button, [role="button"], [role="menuitem"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Adjust menu items for better touch */
    .main-menu a {
        padding: 12px 16px;
        margin: 4px 0;
    }
    
    /* Make sure form elements are easily tappable */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    input[type="number"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    /* Ensure header has proper z-index */
    header {
        position: relative;
        z-index: 1000;
    }
    
    /* Show mobile menu button */
    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        position:absolute;
        top:10px;
        right:15px;
    }
    
    /* Hide desktop menu by default on mobile */
    .main-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        z-index: 999;
        transform: translateX(100%);
        margin: 0;
    }
    
    /* Show menu when expanded */
    .main-menu[aria-expanded="true"] {
        display: flex;
        transform: translateX(0);
    }
    
    /* Menu items */
    .main-menu li {
        margin: 5px 0;
        width: 100%;
    }
    
    .main-menu a {
        display: block;
        padding: 12px 16px;
        color: var(--text-color);
        text-decoration: none;
        border-radius: 4px;
        transition: background-color 0.2s;
    }
    
    .main-menu a:hover,
    .main-menu a:focus {
        background-color: rgba(0, 0, 0, 0.05);
        outline: 2px solid #2e7d32;
        outline-offset: 2px;
    }
    
    .main-menu a.active {
        color: var(--primary-color);
        font-weight: 500;
    }
    
    /* Overlay when menu is open */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .menu-overlay[aria-hidden="false"] {
        display: block;
    }
    .mobile-menu-button {
        display: block;
    }

    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .main-menu[aria-expanded="true"] {
        right: 0;
    }

    .main-menu li {
        margin: 10px 0;
    }

    .main-menu a {
        display: block;
        padding: 12px 0;
        color: var(--text-color);
        text-decoration: none;
    }

    .main-menu a:hover,
    .main-menu a:focus {
        color: var(--primary-color);
        outline: 2px solid #2e7d32;
        outline-offset: 2px;
    }
}

/* Focus styles */
.mobile-menu-button:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

/* Language Switcher */
.language-switcher {
  display:flex;
  gap:8px;
  padding:1rem;
  justify-content:center;
}
.language-switcher .lang-btn{
  background: rgba(46, 125, 50, 0.1);
  border: 2px solid var(--primary-color, #2e7d32);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color, #2e7d32);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.language-switcher .lang-btn:hover {
  background: rgba(46, 125, 50, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
}

.language-switcher .lang-btn[aria-pressed="true"]{
  background: var(--primary-color, #2e7d32);
  color: #fff;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.4);
}

.language-switcher .lang-btn[aria-pressed="true"]:hover {
  background: #1b5e20;
  transform: translateY(-1px);
}

/* Header & Navigation */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 4px;
    margin-right: 10px;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.tagline {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background-color: var(--background-alt);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../assets/Background.jpg') no-repeat center center;
    background-size: cover;
    text-align: center;
    padding: 7rem 1.5rem 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px; /* Account for fixed header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.documents-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.document-frame {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Footer */
.mobile-footer {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #ecf0f1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Ensure language switcher inside menu is visible */
@media (max-width: 1024px) {
    .main-menu .language-switcher{
        display:flex !important;
    }
}

/* Language Picker in Mobile Menu */
.language-picker-container {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.language-picker {
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: center;
}

.language-options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 0.5rem;
}

.lang-btn {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    margin: 0;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
    text-align: center;
    min-width: 40px;
    border-radius: 4px;
}

.lang-separator {
    color: rgba(255, 255, 255, 0.4);
    padding: 0 2px;
}

.lang-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.lang-btn.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    font-weight: 600;
    position: relative;
}

.lang-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: var(--primary-light);
    border-radius: 2px;
}

/* Ensure language switcher is above mobile menu */
.mobile-nav {
    z-index: 1001;
}

/* Responsive Adjustments */

/* Screen reader only */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
@media (min-width: 768px) {
    .mobile-header,
    .header-container {
        padding: 1rem 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.4rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
}
