/* McIlhargey Family Website - Modern Stylesheet */

/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    background-attachment: fixed;
    font-family: Verdana, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a {
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
    background: #fff;
}

/* Improved focus visibility for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Layout ===== */
.container {
    max-width: 779px;
    margin: 0 auto;
    text-align: center;
}

.banner-section {
    width: 100%;
    margin-bottom: 20px;
}

#rotating-banner {
    width: 100%;
    max-width: 778px;
    height: auto;
    margin: 0 auto;
    animation: fadeIn 1s ease-in;
}

.content-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== Typography ===== */
h1 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
    color: #333;
}

/* ===== Images ===== */
.logo {
    margin: 20px auto;
    max-width: 100%;
}

.family-photo {
    margin: 20px auto 0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===== Navigation Menu ===== */
.navigation-menu {
    margin: 30px 0;
    padding: 0;
}

.navigation-menu h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #000;
    font-weight: bold;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px auto;
    max-width: 700px;
}

.nav-card {
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 120px; /* Ensure adequate touch target */
    min-width: 160px;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
    border-color: #2563eb;
    background: #eff6ff;
    text-decoration: none;
}

.nav-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3), 0 0 0 3px #fbbf24;
}

.nav-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.nav-title {
    font-size: 1rem;
    font-weight: bold;
    color: #000;
}

.nav-desc {
    font-size: 0.85rem;
    color: #666;
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer a {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #e0e7ff;
    background: transparent;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 800px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .navigation-menu h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.25rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: 15px 10px;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .nav-card {
        padding: 15px;
    }
    
    .nav-icon {
        font-size: 2rem;
    }
    
    .nav-title {
        font-size: 0.95rem;
    }
    
    .site-footer {
        font-size: 0.8rem;
        padding: 15px 10px;
    }
}
