/*
Theme Name: stayNH Clone
Theme URI: https://staynh.org/
Description: Custom WordPress theme replicating staynh.org (New Hampshire Bed & Breakfast Association) visual design. Exact color palette, typography, mega-menu navigation, footer layout, and responsive grid system.
Version: 1.0.0
Author: Generated by Codex
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: staynh-clone
Tags: custom-logo, full-width-template, e-commerce, translation-ready
*/

/* =============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS from staynh.org)
   Color1=#488d4e  Color2=#fad953  Color3=#f39e56
   Color4=#55c1e2  Color5=#414141  Color6=#FFFFFF
   BackgroundColor7=#EEEFF4
   ============================================= */

:root {
    --color-primary: #488d4e;       /* green - buttons, accents */
    --color-secondary: #fad953;     /* yellow */
    --color-accent: #f39e56;        /* orange */
    --color-info: #55c1e2;          /* blue */
    --color-text: #414141;          /* dark gray */
    --color-white: #FFFFFF;
    --color-bg-light: #EEEFF4;      /* light gray backgrounds */
    --color-black: #000000;

    --font-heading-primary: 'Cinzel', serif;
    --font-heading-secondary: 'Abril Fatface', cursive;
    --font-body: 'Open Sans', sans-serif;
    --font-accent: 'Montserrat', sans-serif;
    --font-serif: 'Crimson Text', serif;

    --max-width: 1200px;
    --header-height: 80px;
    --transition-fast: 0.2s ease;
    --transition-med: 0.35s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-info); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading-primary); color: var(--color-text); line-height: 1.3; margin-bottom: 0.75rem; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p  { margin-bottom: 1rem; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---- Utility classes matching staynh.org ---- */
.Color1   { color: var(--color-primary) !important; }
.Color2   { color: var(--color-secondary) !important; }
.Color3   { color: var(--color-accent) !important; }
.Color4   { color: var(--color-info) !important; }
.Color5   { color: var(--color-text) !important; }
.Color6   { color: var(--color-white) !important; }

.BackgroundColor1 { background-color: var(--color-primary) !important; }
.BackgroundColor2 { background-color: var(--color-secondary) !important; }
.BackgroundColor3 { background-color: var(--color-accent) !important; }
.BackgroundColor4 { background-color: var(--color-info) !important; }
.BackgroundColor5 { background-color: var(--color-text) !important; }
.BackgroundColor6 { background-color: var(--color-white) !important; }
.BackgroundColor7 { background-color: var(--color-bg-light) !important; }

.text-center  { text-align: center; }
.text-right   { text-align: right; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.px-container { padding-left: 15px; padding-right: 15px; max-width: var(--max-width); margin: 0 auto; }

/* =============================================
   HEADER (matching staynh.org header)
   ============================================= */

.site-header {
    position: sticky; top: 0; z-index: 999;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-width); margin: 0 auto; padding: 0 15px;
    height: var(--header-height);
}

.site-logo a { display: flex; align-items: center; }
.site-logo img { height: 60px; width: auto; }

/* ---- Mega Menu ---- */
.main-nav ul { list-style: none; display: flex; gap: 0; align-items: center; }

.main-nav > ul > li { position: relative; }

.main-nav a.menu-item-link {
    display: block; padding: 1rem 1rem; font-family: var(--font-accent);
    font-size: 0.95rem; font-weight: 600; text-transform: uppercase;
    color: var(--color-text); letter-spacing: .5px; position: relative;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.main-nav a.menu-item-link:hover,
.main-nav .menu-item-has-children > a:hover {
    color: var(--color-primary);
}

/* Dropdown / mega-menu */
.main-nav .sub-menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
    background: var(--color-white); box-shadow: 0 4px 18px rgba(0,0,0,.12);
    border-top: 3px solid var(--color-primary); z-index: 999;
    flex-direction: column; list-style: none; padding: 0; margin: 0;
}

.main-nav .menu-item-has-children:hover > .sub-menu,
.main-nav .menu-item-has-children:focus-within > .sub-menu { display: flex; }

.main-nav .sub-menu li a {
    display: block; padding: .7rem 1.2rem; font-size: .9rem; color: var(--color-text);
    border-bottom: 1px solid #f0f0f0; transition: background var(--transition-fast), color var(--transition-fast);
}
.main-nav .sub-menu li a:hover { background: var(--color-bg-light); color: var(--color-primary); }

/* Caret icon for dropdown toggles */
.main-nav .menu-item-has-children > a::after {
    content: ' \25B6'; font-size: .7em; margin-left: 4px; opacity: .5; transition: transform var(--transition-fast);
}
.main-nav .menu-item-has-children:hover > a::after { transform: rotate(90deg); }

/* ---- Header contact info (phone/email) ---- */
.header-contact { display: flex; align-items: center; gap: 1rem; font-size: .85rem; color: var(--color-text); }
.header-contact .phone a, .header-contact .email a { color: var(--color-primary); font-weight: 600; }
.header-contact i { margin-right: 4px; }

/* ---- Mobile menu toggle ---- */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: .5rem; color: var(--color-text); }

@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    .header-contact { display: none; }

    .main-nav ul { display: none; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-white); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
    .main-nav.active ul { display: flex; }
    .main-nav > ul > li { width: 100%; border-bottom: 1px solid #f0f0f0; }
    .main-nav a.menu-item-link { padding: .9rem 1.2rem; font-size: 1rem; }
    .main-nav .sub-menu { position: static; box-shadow: none; border-top: none; background: var(--color-bg-light); min-width: auto; }
}

/* =============================================
   HERO / SLIDESHOW SECTION
   ============================================= */

.hero-slideshow {
    position: relative; width: 100%; height: 65vh; min-height: 400px; max-height: 700px;
    overflow: hidden; background: #222;
}

.hero-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease;
    display: flex; align-items: center; justify-content: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; z-index: 1;
}
.hero-content { color: var(--color-white); max-width: 700px; }
.hero-content h2 { font-size: 3rem; color: var(--color-white); margin-bottom: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,.3); }
.hero-content p { font-size: 1.2rem; margin-bottom: 1.5rem; }

.hero-btn {
    display: inline-block; padding: .75rem 2rem; background: var(--color-primary); color: var(--color-white);
    font-family: var(--font-accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 4px; transition: background var(--transition-fast), transform var(--transition-fast);
}
.hero-btn:hover { background: var(--color-info); color: var(--color-white); transform: translateY(-2px); }

/* Slide dots */
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 10px; }
.hero-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: background var(--transition-fast); }
.hero-dot.active { background: var(--color-white); }

/* =============================================
   REGION CARDS SECTION
   ============================================= */

.section-regions { padding: 4rem 0; background: var(--color-bg-light); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 2rem; color: var(--color-primary); }
.section-header p { font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.regions-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;
    max-width: var(--max-width); margin: 0 auto; padding: 0 15px;
}

.region-card {
    background: var(--color-white); border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: transform var(--transition-med), box-shadow var(--transition-med);
}
.region-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

.region-card-img { height: 200px; overflow: hidden; }
.region-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.region-card:hover .region-card-img img { transform: scale(1.05); }

.region-card-body { padding: 1.25rem; }
.region-card-body h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.region-card-body a { display: inline-block; color: var(--color-primary); font-weight: 600; text-transform: uppercase; font-size: .85rem; letter-spacing: .5px; }
.region-card-body a::after { content: ' \2192'; transition: margin var(--transition-fast); }
.region-card:hover .region-card-body a::after { margin-left: 4px; }

/* =============================================
   B&B LISTING SECTION (cards grid)
   ============================================= */

.section-bbs { padding: 4rem 0; }

.bb-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem;
    max-width: var(--max-width); margin: 0 auto; padding: 0 15px;
}

.bb-card {
    background: var(--color-white); border-radius: 6px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08); display: flex; flex-direction: column;
    transition: box-shadow var(--transition-med);
}
.bb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.bb-card-img { height: 180px; overflow: hidden; }
.bb-card-img img { width: 100%; height: 100%; object-fit: cover; }

.bb-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.bb-card-body h4 { font-size: 1.05rem; margin-bottom: .35rem; }
.bb-card-body p { font-size: .9rem; color: #666; margin-bottom: .75rem; flex: 1; }
.bb-card-body .btn-primary {
    display: inline-block; padding: .5rem 1.25rem; background: var(--color-primary); color: var(--color-white);
    font-size: .85rem; font-weight: 600; text-transform: uppercase; border-radius: 4px;
    transition: background var(--transition-fast);
}
.bb-card-body .btn-primary:hover { background: var(--color-info); color: var(--color-white); }

/* =============================================
   CONTENT SECTIONS (About, terms, etc.)
   ============================================= */

.section-content { padding: 4rem 0; }
.section-content-inner { max-width: 800px; margin: 0 auto; padding: 0 15px; }

/* Two-column layout */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }
@media (max-width: 768px) { .twocol { grid-template-columns: 1fr; } }

/* =============================================
   FOOTER (matching staynh.org footer layout)
   ============================================= */

.site-footer {
    background: #f5f5f5; border-top: 3px solid var(--color-primary); padding: 0;
}

.footer-navbar {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-width); margin: 0 auto; padding: 2rem 15px; flex-wrap: wrap; gap: 1.5rem;
}

.footer-logo img { height: 50px; width: auto; }

.footer-nav-menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: center; }
.footer-nav-menu a { font-size: .85rem; color: var(--color-text); font-weight: 500; text-transform: uppercase; letter-spacing: .3px; transition: color var(--transition-fast); }
.footer-nav-menu a:hover { color: var(--color-primary); }

.footer-back-to-top a { display: inline-block; padding: .5rem 1rem; background: var(--color-primary); color: var(--color-white); border-radius: 4px; font-size: .85rem; transition: background var(--transition-fast); }
.footer-back-to-top a:hover { background: var(--color-info); color: var(--color-white); }

.footer-action-bar {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-width); margin: 0 auto; padding: 1rem 15px 2rem; flex-wrap: wrap; gap: 1rem;
}

.social-bar a { display: inline-block; width: 36px; height: 36px; line-height: 36px; text-align: center; border-radius: 50%; background: var(--color-primary); color: var(--color-white); font-size: 1rem; margin-right: .5rem; transition: background var(--transition-fast), transform var(--transition-fast); }
.social-bar a:hover { background: var(--color-info); color: var(--color-white); transform: scale(1.1); }

.footer-copyright { font-size: .85rem; color: #666; line-height: 1.6; }
.footer-credit { font-size: .8rem; color: #999; text-align: right; }
.footer-credit a { color: var(--color-primary); }

@media (max-width: 768px) {
    .footer-navbar { flex-direction: column; text-align: center; padding: 1.5rem 15px; }
    .footer-nav-menu ul { justify-content: center; gap: .5rem 1rem; }
    .footer-action-bar { flex-direction: column; align-items: center; text-align: center; }
    .footer-credit { text-align: center; }
}

/* =============================================
   WIDGET AREAS / SIDEBARS
   ============================================= */

.widget-area { padding: 2rem 0; }
.widget-area-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 15px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }

/* =============================================
   PAGINATION
   ============================================= */

.pagination { text-align: center; padding: 2rem 0; }
.pagination a, .pagination span { display: inline-block; padding: .4rem .8rem; margin: 0 3px; border-radius: 3px; background: var(--color-bg-light); color: var(--color-text); font-size: .9rem; transition: all var(--transition-fast); }
.pagination a:hover, .pagination .current { background: var(--color-primary); color: var(--color-white); }

/* =============================================
   RESPONSIVE / BREAKPOINTS (match target)
   ============================================= */

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; } .hero-content h2 { font-size: 2rem; }
    .hero-slideshow { height: 50vh; min-height: 300px; }
    .regions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-slideshow { height: 45vh; }
    .hero-content h2 { font-size: 1.6rem; }
}
