/*
 * Default stylesheet for SPHR Connector templates
 *
 * This stylesheet provides a clean, responsive layout for resource listings and detail views.
 *
 * You can override these styles in your theme if needed by dequeuing this stylesheet
 * or targeting the same classes in your own CSS.
 */

/* Reset and base styles */
.sphr-page-template {
    margin: 0 auto;
    margin-top: 100px !important;

    padding: 2rem;
    max-width: 1200px;
    font-family: sans-serif;
}

.sphr-page-template h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.sphr-page-template h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Resource category grid */
.sphr-resource-index .sphr-category,
.sphr-resource-category .sphr-resource-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    text-align: center;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0;
}

.sphr-resource-index .sphr-category p,
.sphr-resource-category .sphr-resource-item p {
    margin-top: 10px;
    margin-bottom: 10px;
}

.sphr-resource-index .sphr-category:hover,
.sphr-resource-category .sphr-resource-item:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sphr-category a,
.sphr-resource-item a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.sphr-category-thumb,
.sphr-resource-thumb {
    width: 100%;
    display: block;
    min-height: 200px;
    height: auto;
    aspect-ratio: 29 / 25;
    object-fit: cover;
    background-color: #f4f4f4;
}

.sphr-category-count {
    font-size: 1rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Responsive grid */
.sphr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    justify-content: start;
}

/* Detail page */
.sphr-resource-detail .sphr-preview-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 6px;

    /* Masking for gradient effect - makes the bottom 50% fade to transparent */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
}

.sphr-top-content,
.sphr-content {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.sphr-breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.sphr-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.sphr-breadcrumb a:hover {
    text-decoration: underline;
}

.sphr-subcategory-nav {
    margin-bottom: 2rem;
    background: #f9f9f9;
}

.sphr-subcategory-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sphr-subcategory-nav li + li {
    margin-top: 0.5rem;
}

.sphr-subcategory-nav a {
    display: inline-block;
    font-size: 0.95rem;
    color: #0073aa;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    background: #fff;
    transition: background 0.2s;
}

.sphr-subcategory-nav a:hover {
    background: #e2f0fa;
    text-decoration: underline;
}

.sphr-subcategory-nav p{
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}



.sphr-search-form {
    margin: 1.5rem 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sphr-search-form input[type="text"],
.sphr-search-form button[type="submit"] {
    height: 44px; /* forces matching heights */
    box-sizing: border-box;
    line-height: 1.2;
}

.sphr-search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0 0.75rem; /* adjust padding so height is consistent */
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.sphr-search-form button[type="submit"] {
    padding: 0 1rem; /* vertical padding not needed when height is fixed */
    font-size: 1rem;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sphr-search-form button[type="submit"]:hover {
    background-color: #005fa3;
}


div.sphr-category-description{
    margin-bottom:15px;
    margin-top:15px;
}

div.sphr-resource-home-content{
    margin-bottom:25px;
    margin-top:15px;
}


@media (max-width: 768px) {
    .sphr-page-template {
        padding: 1rem;
    }

    .sphr-page-template h1 {
        font-size: 1.5rem;
    }

    .sphr-page-template h2 {
        font-size: 1.2rem;
    }
}


html {
    scroll-behavior: smooth;
}

.box {
      background: #e6f2fa;
      border: 2px solid #b3d9f5;
      border-radius: 10px;
      padding: 30px;
      text-align: center;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      width: 320px;
      display: block;
      justify-self: center;
      margin-top: 50px;
      width: 700px;
    }

    .box h2 {
      color: #1e88e5;
      margin-bottom: 15px;
    }

    .box p {
      color: #555;
      font-size: 14px;
      margin-bottom: 25px;
    }

    .join-btn {
      display: inline-block;
      background: #4daaf5;
      color: white;
      font-size: 16px;
      font-weight: bold;
      padding: 12px 25px;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
    }

    .join-btn:hover {
      background: #1e88e5;
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(30, 136, 229, 0.3);
    }