/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header and Navigation */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-container h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-container h1 a {
    color: #333;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    position: relative;
}

nav li {
    display: inline;
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 300px;
    max-width: calc(100vw - 2rem);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    padding: 0.5rem 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

/* Prevent dropdown from going off-screen on desktop */
@media (min-width: 769px) {
    .dropdown-menu {
        right: auto;
    }
    
    /* If menu would go off right edge, align to right instead */
    .dropdown:last-child .dropdown-menu,
    .dropdown-menu.rtl {
        left: auto;
        right: 0;
    }
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    display: block;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-menu li a:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    flex: 1;
}

/* Status containers wrapper - displays today and tomorrow side by side */
.status-containers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Status container - the main YES/NO display */
.status-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #495057;
}

.status-text {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.status-open .status-text {
    color: #28a745;
}

.status-closed .status-text {
    color: #dc3545;
}

.status-explanation {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.holiday-name {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 500;
}

.holiday-note {
    font-size: 1.1rem;
    color: #17a2b8;
    font-weight: 500;
    margin-top: 0.5rem;
}

.current-date {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #6c757d;
}

/* Info section */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.info-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.info-section p {
    margin-bottom: 1rem;
}

.holiday-status-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
}

.holiday-status-list li {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f8f9fa;
    transition: transform 0.2s, box-shadow 0.2s;
}

.holiday-status-list li:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.holiday-closed {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #ffeaea 0%, #f8f9fa 100%);
}

.holiday-open {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #eaffea 0%, #f8f9fa 100%);
}

.holiday-limited {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff8ea 0%, #f8f9fa 100%);
}

.note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    font-style: italic;
}

/* Holidays grid */
.holidays-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-description {
    margin-bottom: 2rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.holidays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.open-holidays-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.open-holidays-section h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

.open-holidays-list {
    list-style: none;
    padding: 0;
}

.open-holidays-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.open-holidays-list li a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
}

.open-holidays-list li a:hover {
    color: #007bff;
}

.holiday-card {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.holiday-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.holiday-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.holiday-card h3 a {
    color: #495057;
    text-decoration: none;
}

.holiday-card h3 a:hover {
    color: #007bff;
}

.holiday-date {
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.holiday-description {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Individual holiday page */
.holiday-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.holiday-detail h2 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.english-name {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 2rem;
}

.holiday-info {
    margin-bottom: 2rem;
}

.stores-closed-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.stores-closed-notice p {
    color: #721c24;
    margin: 0.5rem 0;
}

.back-link {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* Ad container */
.ad-container {
    text-align: center;
    margin: 2rem 0;
    min-height: 100px;
}

/* Error page */
.error-container {
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-container h2 {
    margin-bottom: 1rem;
    color: #dc3545;
}

.back-home {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.back-home:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 3rem;
    color: #6c757d;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    margin: 0 0.5rem;
    color: #6c757d;
}

.footer-links a:hover {
    color: #007bff;
}

/* Responsive design - tablets and mobile */
@media (max-width: 1024px) {
    /* Use fixed positioning for tablets and mobile to prevent off-screen issues */
    .dropdown-menu {
        display: none !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        min-width: 90vw !important;
        width: 90vw !important;
        max-width: 500px !important;
        max-height: 70vh !important;
        margin: 0 !important;
        z-index: 10000 !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease !important;
    }

    .dropdown:hover .dropdown-menu {
        display: none !important;
    }

    .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        transform: translate(-50%, -50%) !important;
        pointer-events: auto !important;
    }

}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-container h1 {
        font-size: 1.2rem;
        text-align: center;
    }

    nav ul {
        gap: 0.75rem;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    nav li {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    nav li a {
        padding: 0.4rem 0.8rem;
    }

    /* Mobile-specific adjustments */
    .dropdown-menu {
        min-width: 85vw !important;
        max-width: 85vw !important;
        width: 85vw !important;
    }

    .dropdown-menu li {
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu a {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        display: block;
        color: #333;
    }

    .dropdown-menu a:hover {
        background: rgba(102, 126, 234, 0.1);
        text-decoration: none;
    }

    .dropdown-toggle {
        padding: 0.4rem 0.8rem;
        background: rgba(102, 126, 234, 0.15);
        border-radius: 6px;
        border: 1px solid rgba(102, 126, 234, 0.3);
        display: inline-block;
    }

    .status-containers {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .status-text {
        font-size: 3rem;
    }

    .status-container {
        padding: 2rem 1rem;
    }

    .status-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .holidays-grid {
        grid-template-columns: 1fr;
    }

    .holiday-card {
        padding: 1rem;
    }
}

/* Easter dates page styles */
.easter-dates-section {
    margin: 2rem 0;
}

.easter-info {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.easter-table-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.easter-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.easter-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.easter-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.easter-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.easter-table tbody tr:last-child td {
    border-bottom: none;
}

.easter-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.easter-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

.easter-explanation {
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.easter-explanation h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.easter-explanation p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.easter-explanation p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .easter-table {
        font-size: 0.9rem;
    }
    
    .easter-table th,
    .easter-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .easter-explanation {
        padding: 1.5rem;
    }
}
