/* 
Theme Name: Queen of the Pitch
Theme URI: https://queenofthepitch.com
Author: Teresa Milne
Description: A custom theme for Women's Super League fans.
Version: 1.0
Text Domain: queen-of-the-pitch
*/

/* ============================= */
/* 1. GLOBAL RESETS & TYPOGRAPHY */
/* ============================= */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ============================= */
/* 2. HEADER & NAVIGATION */
/* ============================= */
.site-header {
    background: #3a0ca3;
    color: white;
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    display: block;
    color: white;
    margin-bottom: 5px;
}

.tagline { font-size: 14px; color: #ddd; margin: 0; }

/* Desktop Menu */
.main-nav .menu {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.main-nav .menu li { position: relative; }
.main-nav .menu a {
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.main-nav .menu a:hover { background: #4cc9f0; color: white; }

/* Dropdown Menu */
.main-nav .menu li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #3a0ca3;
    padding: 10px 0;
    min-width: 200px;
    border-radius: 5px;
}
.main-nav .menu li:hover ul.sub-menu { display: block; }
.main-nav .menu li ul.sub-menu a { display: block; padding: 10px 20px; }
.main-nav .menu li ul.sub-menu a:hover { background: #4cc9f0; }

/* Hamburger for Mobile */
.hamburger {
    display: none;
    font-size: 26px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Mobile Menu Animation */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .main-nav { 
        max-height: 0; 
        overflow: hidden; 
        opacity: 0; 
        transition: max-height 0.4s ease, opacity 0.3s ease; 
    }
    body.menu-open .main-nav {
        max-height: 500px;
        opacity: 1;
    }
    .main-nav .menu { flex-direction: column; gap: 10px; }
    .main-nav .menu li ul.sub-menu { position: static; background: none; padding: 0; }
}

.custom-logo { max-height: 80px; width: auto; height: auto; }

/* ============================= */
/* 3. HERO SECTION */
/* ============================= */
.custom-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    text-align: center;
    color: white;
}

.custom-hero img { width: 100%; height: auto; display: block; }

.custom-hero .hero-text {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 90%;
    text-align: center;
}

.custom-hero .hero-text h1 { margin: 0; font-size: 28px; }
.custom-hero .hero-text p { margin: 5px 0 0; font-size: 16px; }

/* Hide hero text on small screens */
@media (max-width: 768px) {
    .custom-hero .hero-text { display: none; }
}

/* ============================= */
/* 4. QUICK LINKS (Homepage Buttons) */
/* ============================= */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
    flex-wrap: wrap;
    max-width: 95%;
}

.quick-links a {
    background: #4cc9f0;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease;
    flex: 1 1 140px;
    text-align: center;
}

.quick-links a:hover { background: #3a0ca3; }

@media (max-width: 768px) {
    .quick-links a { flex: 1 1 100%; }
}

/* ============================= */
/* 5. NEWS GRID (Homepage & Category) */
/* ============================= */
.latest-news {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.latest-news h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.news-card:hover { transform: translateY(-3px); }
.news-card img { width: 100%; display: block; }
.news-card h3 { font-size: 16px; margin: 10px; }

/* Category Page */
.category-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.category-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 10px;
}

.category-description {
    text-align: center;
    font-size: 16px;
    margin-bottom: 30px;
    color: #666;
}

.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background: #3a0ca3;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.pagination a:hover { background: #4cc9f0; }

/* ============================= */
/* 6. SOCIAL MEDIA FEEDS */
/* ============================= */
.social-feed {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.social-feed h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.social-embeds {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.social-card {
    flex: 1 1 300px;
    max-width: 350px;
    min-width: 280px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 10px;
}

@media (max-width: 768px) {
    .social-card iframe { width: 100% !important; max-width: 320px; }
}

/* ============================= */
/* 7. SINGLE POST PAGE */
/* ============================= */
.single-post {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.single-post h1 {
    font-size: 32px;
    margin-bottom: 15px;
    text-align: center;
}

.single-post .post-meta {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 25px;
}

.single-post .post-image img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 25px;
}

.single-post .post-content {
    font-size: 18px;
    line-height: 1.6;
    color: #222;
}

.single-post .post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    font-weight: bold;
}

.single-post .post-navigation a {
    color: #3a0ca3;
    text-decoration: none;
}

.single-post .post-navigation a:hover {
    text-decoration: underline;
}

.single-post .post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

/* Related Posts Grid */
.related-posts {
    margin-top: 50px;
    text-align: center;
}

.related-posts h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #3a0ca3;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.related-card {
    background: #f8f8f8;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s;
    text-align: center;
}

.related-card:hover { transform: scale(1.03); }
.related-card img { width: 100%; display: block; }
.related-card p { padding: 8px; font-size: 14px; color: #222; }

/* ============================= */
/* 8. PAGE LAYOUT (Generic Pages) */
/* ============================= */
.page-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.page-content .entry-content {
    font-size: 18px;
    line-height: 1.6;
    color: #222;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 15px 0;
}

/* Mobile Edge Padding */
@media (max-width: 480px) {
    .page-content, 
    .single-post, 
    .category-page {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ============================= */
/* 9. FOOTER */
/* ============================= */
.site-footer {
    background: #3a0ca3;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo img { max-height: 60px; margin-bottom: 20px; }

.footer-nav { list-style: none; padding: 0; margin: 0 0 20px 0; }
.footer-nav li { display: inline-block; margin: 0 10px; }
.footer-nav a { color: white; font-weight: bold; }
.footer-nav a:hover { text-decoration: underline; }

.footer-social a { margin: 0 10px; color: white; }
.footer-social a:hover { color: #4cc9f0; }

.footer-copy { margin-top: 20px; font-size: 14px; opacity: 0.8; }
/* ===== Desktop Logo Enlargement ===== */
@media (min-width: 1024px) {
    .custom-logo {
        max-height: 160px; /* was 80px before */
    }
}
/* ===== Text Link Styling ===== */
.entry-content a,
.single-post .post-content a,
.page-content .entry-content a {
    color: #4cc9f0;           /* Light blue to match your theme */
    font-weight: bold;        /* Makes links stand out */
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-content a:hover,
.single-post .post-content a:hover,
.page-content .entry-content a:hover {
    color: #3a0ca3;           /* Deep purple on hover */
    text-decoration: none;    /* Clean hover effect */
}
/* =============================
   WSL Fixtures Table Styling
   ============================= */
.wsl-table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin: 20px 0;
}

/* Main table styling */
.wsl-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    min-width: 500px;
    /* ensures good spacing on desktop */
}

/* Header row */
.wsl-table thead {
    background-color: #3a0ca3;
    /* purple header */
    color: #fff;
}

.wsl-table th,
.wsl-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    /* keep text tidy */
}

/* Logos */
.wsl-table .wsl-logo {
    height: 40px;
    /* default desktop size */
    vertical-align: middle;
    margin-right: 6px;
}

/* Hover effect on rows for desktop */
.wsl-table tr:hover {
    background-color: #f9f9f9;
}
/* =============================
   WSL Fixtures Table Styling
   ============================= */
.wsl-table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin: 20px 0;
}

/* Main table styling */
.wsl-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    min-width: 500px;
    /* ensures good spacing on desktop */
}

/* Header row */
.wsl-table thead {
    background-color: #3a0ca3;
    /* purple header */
    color: #fff;
}

.wsl-table th,
.wsl-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    /* keep text tidy */
}

/* Logos */
.wsl-table .wsl-logo {
    height: 40px;
    /* default desktop size */
    vertical-align: middle;
    margin-right: 6px;
}

/* Hover effect on rows for desktop */
.wsl-table tr:hover {
    background-color: #f9f9f9;
}

/* =============================
   WSL Fixtures Table Styling
   ============================= */
.wsl-table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin: 20px 0;
}

/* Main table styling */
.wsl-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    table-layout: auto;
    /* allows flexible column widths */
}

/* Header row */
.wsl-table thead {
    background-color: #3a0ca3;
    color: #fff;
}

.wsl-table th,
.wsl-table td {
    padding: 10px 6px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
    /* allow long team names to wrap */
}

/* Logos */
.wsl-table .wsl-logo {
    height: 36px;
    /* default desktop size */
    vertical-align: middle;
    margin-right: 4px;
    max-width: 40px;
}

/* Hover effect for desktop */
.wsl-table tr:hover {
    background-color: #f9f9f9;
}

/* =============================
   Mobile-Friendly Adjustments
   ============================= */
@media (max-width: 768px) {
    .wsl-table {
        font-size: 12px;
    }

    .wsl-table .wsl-logo {
        height: 26px;
        max-width: 28px;
        margin-right: 2px;
    }

    .wsl-table th,
    .wsl-table td {
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .wsl-table {
        font-size: 11px;
    }

    .wsl-table .wsl-logo {
        height: 22px;
        max-width: 24px;
    }

    .wsl-table th,
    .wsl-table td {
        padding: 5px 3px;
    }
}
/* ===== Force WSL tables to fit mobile ===== */
@media (max-width: 768px) {
    .wsl-table {
        min-width: unset !important;
        width: 100% !important;
        table-layout: fixed !important;  /* force equal columns */
    }

    .wsl-table th,
    .wsl-table td {
        white-space: normal !important;  /* allow wrapping */
        word-break: break-word !important;
        font-size: 12px !important;
        padding: 4px 3px !important;
    }

    .wsl-table .team-cell {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .wsl-logo,
    .player-photo {
        height: 20px !important;
        width: auto !important;
        max-width: 20px !important;
    }

    .team-name {
        font-size: 11px;
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    .wsl-table th,
    .wsl-table td {
        font-size: 11px !important;
        padding: 3px 2px !important;
    }
    .team-name {
        font-size: 10px;
    }
}

/* ===== Contact (CF7) ===== */
.qotp-contact {
  max-width: 820px;
  margin: 40px auto;
  padding: 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.qotp-contact__title {
  margin: 0 0 18px 0;
  font-size: 28px;
  text-align: left;
  color: #1d1d1f;
}

/* 2-column row for name + email on desktop */
.qotp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (min-width: 768px) {
  .qotp-grid { grid-template-columns: 1fr 1fr; }
}