 :root {
    --primary-color: #2c3e50;
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --primary-light: #3e5771;
    --secondary-color: #3498db;
    --secondary: #3498db;
    --secondary-dark: #2980b9;
    --secondary-light: #5dade2;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --grey-100: #f7f9fa;
    --grey-300: #e2e8f0;
    --text: #333333;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --success: #4CAF50;
    --error: #F44336;
    --transition: all 0.3s ease;
    --radius-md: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
   
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: var(--space-md);
    color: var(--grey-900);
    text-align: center;
}
/* Header Styles */
.site-header {
    background-color: white;
    color: white;
    border-bottom: 1px solid rgb(133, 127, 127);
    top: 0;
    z-index: 100;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

.nav-menu {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav-link {
    color: black;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.3125rem 0.625rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #a7a5a5;
    color: white;
    
}

.nav-link.active {
    background-color:#a7a5a5;
    color: white;
}
/* CHANGED: Enhanced mobile responsiveness */
        @media (max-width: 768px) {
            .header-container {
                flex-direction: column;
                gap: 12px;
                padding: 12px 16px;
                align-items: stretch;
            }
            
            .logo {
                justify-content: center;
                margin-bottom: 8px;
            }
            
            .nav-menu {
                width: 100%;
                justify-content: center;
                gap: 6px;
                max-width: 100%;
                overflow-x: auto; /* CHANGED: Allow horizontal scroll if needed */
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                -ms-overflow-style: none;
            }

            .nav-menu::-webkit-scrollbar {
                display: none;
            }
            
            .nav-link {
                font-size: 0.95rem; /* CHANGED: Even smaller on mobile */
                padding: 8px 12px;
                flex-shrink: 0; /* CHANGED: Prevent shrinking */
                min-width: fit-content;
            }
        }

        /* CHANGED: Extra small screens */
        @media (max-width: 480px) {
            .header-container {
                padding: 10px 12px;
            }

            .nav-menu {
                gap: 4px;
            }
            
            .nav-link {
                font-size: 0.85rem;
                padding: 6px 8px;
            }
        }
/* ======================= BUTTON STYLES ======================= */
.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--grey-100);
    color: var(--text);
}

.btn-secondary:hover {
    background-color: var(--grey-300);
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: #388E3C;
}

.btn-error {
    background-color: var(--error);
}

.btn-error:hover {
    background-color: #D32F2F;
}

.btn-icon {
    width: 44px;
    padding: 0;
    justify-content: center;
}

/* ======================= SECTION STYLES ======================= */
section {
   
    
    margin: 20px 0;
    padding: 30px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

h3 {
    color: var(--secondary-color);
    margin: 20px 0 10px 0;
}

p {
    margin-bottom: 15px;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 10px;
}

/* ======================= MORSE CODE SPECIFIC STYLES ======================= */
.morse-alphabet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.morse-card {
    background-color: var(--light-color);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.morse-card .character {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.morse-card .morse {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.interactive-section {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #ddd;
    border: none;
    outline: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
}

.tab.active {
    background-color: var(--secondary-color);
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
    border-radius: 0 0 4px 4px;
}

.tab-content.active {
    display: block;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.morse-display {
    font-family: monospace;
    font-size: 1.5rem;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 4px;
    min-height: 60px;
}

.dit {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin: 0 5px;
}

.dah {
    display: inline-block;
    width: 60px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 10px;
    margin: 0 5px;
}

.audio-controls {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.progress-container {
    margin: 30px 0;
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 20px;
}

.progress-bar {
    height: 30px;
    background-color: #eee;
    border-radius: 15px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary-color);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.callout {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 5px solid var(--accent-color);
}

/* ======================= FOOTER STYLES ======================= */
.footer {
    background-color: #18181b;
    border-top: 1px solid var(--border);
    padding-top: 48px;
    margin-top: 48px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-branding {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
}

.footer-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.footer-tagline {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--grey-100);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

.social-link:hover svg {
    fill: var(--primary-dark);
}

.newsletter {
    margin-top: 20px;
}

.newsletter p {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--card-bg);
    color: var(--text);
    font-size: 14px;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.footer-bottom {
    background-color: #000000;
    padding: 20px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ======================= NOTIFICATION STYLES ======================= */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-icon {
    width: 36px;
    height: 36px;
    background-color: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    margin-left: 12px;
}

/* ======================= RESPONSIVE DESIGN ======================= */
@media (max-width: 768px) {
    .morse-alphabet {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-bottom {
        padding: 16px;
    }
}