/* ============================================
   GILES LINK TAROT - SEO OPTIMIZED CSS
   ============================================ */

/* ============================================
   BASE STYLES
   ============================================ */

:root {
    --primary-bg: #1a1a2e;
    --secondary-bg: #16213e;
    --accent-color: #0f3460;
    --text-light: #ffffff;
    --text-muted: #e6e6e6;
    --text-dark: #333333;
    --border-color: #2a2a3e;
    --hover-bg: #0f3460;
    --font-main: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

.navbar {
    background: var(--primary-bg);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar li {
    position: relative;
}

.navbar a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 18px 22px;
    display: block;
    transition: var(--transition);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.navbar a:hover,
.navbar a:focus {
    background: var(--secondary-bg);
    color: var(--text-light);
    outline: none;
}

.navbar a.active {
    background: var(--accent-color);
    color: var(--text-light);
    font-weight: 600;
}

/* Dropdown Styles */
.dropdown-content {
    display: none;
    position: absolute;
    background: var(--primary-bg);
    min-width: 260px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    z-index: 1001;
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: var(--text-muted);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
}

.dropdown-content a:hover,
.dropdown-content a:focus {
    background: var(--hover-bg);
    color: var(--text-light);
    padding-left: 25px;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.dropdown > a::after {
    content: ' ▼';
    font-size: 10px;
    opacity: 0.8;
    margin-left: 5px;
}

/* ============================================
   LAYOUT CONTAINER
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--primary-bg);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

p {
    margin-bottom: 1.2em;
    font-size: 1.05rem;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-bg);
    color: var(--text-light);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .dropdown-content,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* ============================================
   MOBILE RESPONSIVE (TABLET)
   ============================================ */

@media only screen and (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }

    .navbar ul {
        flex-direction: column;
    }

    .navbar li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar a {
        padding: 16px 20px;
        font-size: 16px;
    }

    /* IMPROVED DROPDOWN FOR MOBILE */
    .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        background: #0d1b2a;
        border-top: 2px solid var(--accent-color);
    }

    .dropdown-content a {
        padding: 16px 30px;
        font-size: 15px;
        color: #b8c5d6;
        border-bottom: 1px solid #1a2a3e;
    }

    .dropdown-content a:hover,
    .dropdown-content a:focus {
        background: var(--accent-color);
        color: var(--text-light);
        padding-left: 35px;
    }

    /* Show dropdown on click for mobile */
    .dropdown.active .dropdown-content {
        display: block;
    }

    .container {
        padding: 20px 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
}

/* ============================================
   SMALL MOBILE (XPERIA SIZE)
   ============================================ */

@media only screen and (max-width: 480px) {
    body {
        font-size: 16px; /* INCREASED for better readability */
        line-height: 1.6;
    }

    .navbar a {
        padding: 18px 16px; /* LARGER touch targets */
        font-size: 17px; /* BIGGER font */
        font-weight: 500;
    }

    /* HIGH CONTRAST DROPDOWN FOR SMALL SCREENS */
    .dropdown-content {
        background: #0a1520;
        border-top: 3px solid #1e90ff;
    }

    .dropdown-content a {
        padding: 18px 25px; /* LARGER padding */
        font-size: 16px; /* BIGGER font */
        color: #e0e6ed; /* LIGHTER text for contrast */
        font-weight: 400;
        border-bottom: 1px solid #1a2a3a;
    }

    .dropdown-content a:hover,
    .dropdown-content a:focus {
        background: #1e90ff;
        color: #fff;
    }

    .container {
        padding: 15px 12px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    h1, h2, h3 {
        color: #f0f0f0;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .navbar a {
        color: #fff;
        font-weight: 600;
    }
    
    .dropdown-content a {
        color: #fff;
        border-bottom: 2px solid #fff;
    }
}
