/* === TAN Ashford === */
@font-face {
  font-family: "TAN Ashford";
  src: url("/fonts/ashford-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TAN Ashford";
  src: url("/fonts/ashford-bold-italic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* === Canva Sans === */
@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Canva Sans";
  src: url("/fonts/CanvaSans-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* === School Bell === */
/* You will need to add the font file for School Bell, for example: */
/*
@font-face {
  font-family: "School Bell";
  src: url("/fonts/SchoolBell-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/


/* === Apply globally === */
:root {
  --font-display: "TAN Ashford", Georgia, serif;
  --font-body: "Canva Sans", Arial, sans-serif;
  --font-accent: "School Bell", cursive;

  --color-background: #FFF6EF;
  --color-text-dark: #211D1A;
  --color-text-brown: #694029;
  --color-accent-light: #EB9C54;
  --color-accent-dark: #DD7A20;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-brown);
}

p, body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
}

  button,
  .button,
  [type="button"],
  [type="submit"],
  [role="button"] {
    font-family: var(--font-accent);
    font-weight: 400;
    letter-spacing: 0.5px;
  }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-background);
    line-height: 1.6;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 246, 239, 0.85); /* var(--color-background) with opacity */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(105, 64, 41, 0.1); /* var(--color-text-brown) with opacity */
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-brown);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--color-accent-dark);
}

.contact-btn {
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 16px;
    border: 2px solid var(--color-accent-light);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--color-accent-light);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: var(--color-text-dark);
    transition: 0.3s;
    border-radius: 2px;
}

.hero-section {
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent-dark) 100%);
    color: white;
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hearts" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10,6 C10,3 7,1 5,3 C3,1 0,3 0,6 C0,8 5,12 10,6 Z" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23hearts)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white; /* Overriding heading color for hero */
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 50px;
    text-align: center;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.filter-tabs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 60px;
}

.filter-tab {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background: white;
    color: var(--color-text-brown);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent-dark) 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(221, 122, 32, 0.4);
}

.filter-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.blog-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.blog-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.blog-title-overlay {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    z-index: 2;
}

.blog-content {
    padding: 30px;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.blog-category {
    background: var(--color-accent-light);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-duration {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-article-btn {
    background: var(--color-accent-dark);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.read-article-btn:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
}

.featured-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--color-text-dark);
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.8rem;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .nav {
        padding: 12px 20px;
    }

    .nav-menu {
        display: none;
    }

    .contact-btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-section {
        padding: 100px 15px 60px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 15px;
    }

    .blog-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding: 0 0 15px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tab {
        white-space: nowrap;
        min-width: auto;
        flex-shrink: 0;
    }

    .blog-image {
        height: 220px;
    }

    .blog-title-overlay {
        font-size: 1.3rem;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .blog-content {
        padding: 25px 20px;
    }

    .blog-title {
        font-size: 1.2rem;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card {
        border-radius: 15px;
    }

    .blog-image {
        height: 200px;
    }

    .blog-content {
        padding: 20px 18px;
    }

    .filter-tab {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-radius: 0 0 15px 15px;
    }

    .nav-menu.active li {
        margin: 10px 0;
    }
}

/* Loading animation */
body:not(.loaded) .blog-card {
    opacity: 0;
    transform: translateY(30px);
}

body.loaded .blog-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

/* Enhanced mobile touch interactions */
@media (max-width: 768px) {
    .blog-card:active {
        transform: translateY(-5px) scale(0.98);
    }

    .filter-tab:active {
        transform: translateY(-1px) scale(0.95);
    }
}

/* Accessibility improvements */
.filter-tab:focus,
.blog-card:focus {
    outline: 3px solid var(--color-accent-light);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .filter-tab,
    .fade-in {
        animation: none !important;
        transition: none !important;
    }
}

/* Removing the specific blog card gradient backgrounds to use a consistent brand theme */
.blog-1, .blog-2, .blog-3, .blog-4, .blog-5, .blog-6, .blog-7, .blog-8, .blog-9, .blog-10, .blog-11, .blog-12 {
    background: none;
}

.blog-image{ background-size:cover; background-position:center; display:block; aspect-ratio:16/9; border-radius:14px; overflow:hidden; }
.blog-image{ background-image: var(--bg); } /* uses the inline CSS var from PHP */

/* Hide duplicate title under image */
.blog-title { display:none !important; }
