/*
Theme Name: Schaakwoude
Description: Een modern en clean WordPress theme voor Schaakvereniging Woude
Version: 1.0
Author: Claude
Text Domain: schaakwoude
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Header met gradient */
header {
    background: linear-gradient(135deg, #1e73be 0%, #2980b9 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(30, 115, 190, 0.3);
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo::before {
    content: "♔";
    margin-right: 10px;
    font-size: 2.5rem;
}

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

nav li {
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Dropdown menu styling */
nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
}

nav li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav .sub-menu li {
    width: 100%;
}

nav .sub-menu a {
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 400;
    border-bottom: 1px solid #eee;
}

nav .sub-menu a:hover {
    background: #f8f9fa;
    color: #1e73be;
    transform: none;
}

nav .sub-menu li:first-child a {
    border-radius: 10px 10px 0 0;
}

nav .sub-menu li:last-child a {
    border-radius: 0 0 10px 10px;
    border-bottom: none;
}

/* Hero sectie met schaakbord patroon */
.hero {
    background: linear-gradient(rgba(30, 115, 190, 0.9), rgba(30, 115, 190, 0.9)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><rect x="0" y="0" width="32" height="32" fill="%23ffffff10"/><rect x="32" y="32" width="32" height="32" fill="%23ffffff10"/></svg>');
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #1e73be;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Content sectie */
.content {
    padding: 3rem 0;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.main-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: fit-content;
    overflow: hidden;
}

/* Constrain images in sidebar */
.sidebar img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0.5rem 0;
}

/* Special styling for sponsor images - more specific and restrictive */
.sidebar .widget img,
.sidebar .news-item img {
    max-width: 200px !important;
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0.5rem auto;
}

/* Force all images in sidebar to be constrained */
.sidebar * img {
    max-width: 200px !important;
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.news-item {
    border-left: 4px solid #1e73be;
    padding: 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateX(5px);
    background: #e3f2fd;
}

.news-item h3 a {
    color: #333;
    text-decoration: none;
}

.news-item h3 a:hover {
    color: #1e73be;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
}

h2 {
    color: #1e73be;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 0.5rem;
}

/* WordPress specific classes */
.wp-block-image {
    margin: 1rem 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

/* Widget areas */
.widget {
    margin-bottom: 2rem;
    overflow: hidden;
}

.widget-title {
    color: #1e73be;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 0.5rem;
}

/* Ensure grid doesn't break on mobile with large images */
.grid {
    overflow: hidden;
}

/* Mobile menu styling */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

    nav li {
        width: 100%;
    }

    nav a {
        width: 100%;
        text-align: center;
        border-radius: 10px;
    }

    /* Mobile dropdown styling */
    nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.2);
        box-shadow: none;
        margin-top: 0.5rem;
        border-radius: 10px;
    }

    nav .sub-menu a {
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    nav .sub-menu a:hover {
        background: rgba(255, 255, 255, 0.3);
        color: white;
    }

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

    .hero h1 {
        font-size: 2rem;
    }
}

/* Extra CSS to force image constraints with very high specificity */
body .sidebar img,
body .sidebar .widget img,
body .sidebar .news-item img,
html body .sidebar img {
    max-width: 200px !important;
    max-height: 80px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0.5rem auto !important;
}