/* ========================================
   FindBestBeach.com — Global Stylesheet
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #0077b6;
  --color-primary-dark: #005f8a;
  --color-primary-light: #90e0ef;
  --color-accent: #f4a261;
  --color-accent-dark: #e76f51;
  --color-sand: #fdf0d5;
  --color-sand-dark: #f5e1b8;
  --color-text: #2b2d42;
  --color-text-light: #555b6e;
  --color-white: #ffffff;
  --color-bg: #f8f9fa;
  --color-bg-alt: #edf6f9;
  --color-border: #dee2e6;
  --color-success: #2a9d8f;
  --color-star: #f4a261;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --font-main: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }
ul, ol { padding-left: 1.5rem; }
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--color-text);
  font-weight: 700;
}
h1 { font-size: 2.5rem; margin-bottom: var(--space-md); }
h2 { font-size: 2rem; margin-bottom: var(--space-sm); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--color-primary); color: var(--color-white);
  padding: 0.75rem 1.5rem; z-index: 10000;
  font-weight: 600; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* --- Top Bar --- */
.top-bar {
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-size: 0.85rem;
  padding: 0.4rem 0;
}
.top-bar .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.top-bar a { color: var(--color-primary-light); font-weight: 500; }
.top-bar a:hover { color: var(--color-white); }

/* --- Header --- */
.site-header {
  background: var(--color-white);
  position: sticky; top: 0; z-index: 1000;
  transition: box-shadow 0.3s;
  border-bottom: 1px solid var(--color-border);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height); padding: 0 var(--space-md);
  max-width: var(--max-width); margin: 0 auto;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); display: flex; align-items: center; gap: 0.4rem; }
.logo span { color: var(--color-accent); }

/* --- Main Nav --- */
.main-nav ul { display: flex; list-style: none; gap: var(--space-md); padding: 0; }
.main-nav a {
  color: var(--color-text); font-weight: 600; font-size: 0.95rem;
  padding: 0.4rem 0; position: relative;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--color-primary);
  transition: width 0.3s;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a:hover { color: var(--color-primary); }

.header-cta {
  background: var(--color-accent); color: var(--color-white);
  padding: 0.6rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--color-accent-dark); color: var(--color-white); transform: translateY(-1px); }

/* --- Mobile Nav --- */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span,
.nav-toggle .nav-toggle-bar {
  display: block; width: 24px; height: 2px; background: var(--color-text);
  margin: 5px 0; transition: all 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1),
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2),
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3),
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }

/* --- Hero Sections --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #023e8a 100%);
  color: var(--color-white); padding: var(--space-xl) 0;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}
.hero h1 { font-size: 3rem; margin-bottom: var(--space-sm); position: relative; }
.hero p { font-size: 1.2rem; opacity: 0.9; max-width: 700px; margin: 0 auto var(--space-md); position: relative; }
.hero-image {
  background-size: cover; background-position: center;
  min-height: 400px; display: flex; align-items: center; justify-content: center;
}
.hero-image::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(0,119,182,0.85), rgba(2,62,138,0.85));
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 0.3rem; }
.breadcrumbs li::after { content: '/'; margin-left: 0.5rem; color: var(--color-border); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: var(--color-primary); }
.breadcrumbs span { color: var(--color-text-light); }

/* --- Section Styles --- */
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-sand { background: var(--color-sand); }
.section-header { text-align: center; margin-bottom: var(--space-lg); }
.section-header p { color: var(--color-text-light); max-width: 650px; margin: 0 auto; font-size: 1.1rem; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--color-primary); margin-bottom: var(--space-xs);
}

/* --- Cards --- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: var(--space-md); }
.card-body h3 { margin-bottom: var(--space-xs); }
.card-body p { color: var(--color-text-light); font-size: 0.95rem; }
.card-meta { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: var(--space-xs); display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* --- Grid Layouts --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.grid-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 0.75rem 1.8rem;
  border-radius: var(--radius-sm); font-weight: 700;
  font-size: 0.95rem; transition: all 0.2s;
  cursor: pointer; border: none; text-align: center;
}
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-dark); color: var(--color-white); transform: translateY(-2px); }
.btn-accent { background: var(--color-accent); color: var(--color-white); }
.btn-accent:hover { background: var(--color-accent-dark); color: var(--color-white); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-white); }
.btn-white { background: var(--color-white); color: var(--color-primary); }
.btn-white:hover { background: var(--color-sand); color: var(--color-primary); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* --- Stats Bar --- */
.stats-bar {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-lg) 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* --- Testimonials --- */
.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-accent);
}
.testimonial-card .stars { color: var(--color-star); font-size: 1.1rem; margin-bottom: var(--space-xs); }
.testimonial-card blockquote { font-style: italic; color: var(--color-text-light); margin-bottom: var(--space-sm); line-height: 1.6; }
.testimonial-card .reviewer { font-weight: 700; color: var(--color-text); }
.testimonial-card .review-meta { font-size: 0.85rem; color: var(--color-text-light); }

/* --- Author Bio --- */
.author-bio {
  display: flex; gap: var(--space-md); align-items: flex-start;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}
.author-bio img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-bio .author-name { font-weight: 700; font-size: 1.1rem; }
.author-bio .author-title { color: var(--color-primary); font-size: 0.9rem; font-weight: 600; }
.author-bio p { font-size: 0.9rem; color: var(--color-text-light); margin-top: 0.3rem; }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  overflow: hidden;
}
.faq-question {
  width: 100%; background: var(--color-white);
  border: none; padding: var(--space-sm) var(--space-md);
  text-align: left; font-size: 1rem; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  color: var(--color-text); font-family: var(--font-main);
  transition: background 0.2s;
}
.faq-question:hover { background: var(--color-bg); }
.faq-question::after { content: '+'; font-size: 1.5rem; font-weight: 300; color: var(--color-primary); transition: transform 0.3s; }
.faq-item.active .faq-question::after { content: '\2212'; }
.faq-answer { padding: 0 var(--space-md); max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; }
.faq-item.active .faq-answer { max-height: 600px; padding: 0 var(--space-md) var(--space-md); }

/* --- Process Steps --- */
.process-steps { counter-reset: step; }
.process-step {
  display: flex; gap: var(--space-md); align-items: flex-start;
  margin-bottom: var(--space-md); position: relative;
}
.step-number {
  counter-increment: step;
  width: 50px; height: 50px; flex-shrink: 0;
  background: var(--color-primary); color: var(--color-white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.step-content h3 { margin-bottom: 0.3rem; }
.step-content p { color: var(--color-text-light); }

/* --- Trust Badges --- */
.trust-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); padding: var(--space-md) 0; }
.trust-badge {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: var(--color-text);
  font-size: 0.95rem;
}
.trust-badge .badge-icon {
  width: 40px; height: 40px; background: var(--color-bg-alt);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); font-size: 1.2rem;
}

/* --- Timeline --- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-primary-light); }
.timeline-item { position: relative; margin-bottom: var(--space-md); padding-left: var(--space-md); }
.timeline-item::before {
  content: ''; position: absolute; left: -36px; top: 5px;
  width: 14px; height: 14px; background: var(--color-primary);
  border: 3px solid var(--color-white); border-radius: 50;
  box-shadow: var(--shadow-sm);
  border-radius: 50%;
}
.timeline-year { font-weight: 800; color: var(--color-primary); font-size: 1.1rem; }

/* --- Forms --- */
.form-group { margin-bottom: var(--space-sm); }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }

/* --- Tool/Calculator Styles --- */
.tool-interface {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
}
.tool-result {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
  border: 2px solid var(--color-primary-light);
  display: none;
}
.tool-result.visible { display: block; }
.tool-result h3 { color: var(--color-primary); }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); margin-top: var(--space-sm); }
.result-item { text-align: center; padding: var(--space-sm); background: var(--color-white); border-radius: var(--radius-sm); }
.result-item .result-value { font-size: 1.8rem; font-weight: 800; color: var(--color-primary); }
.result-item .result-label { font-size: 0.85rem; color: var(--color-text-light); }
.range-display { font-weight: 700; color: var(--color-primary); float: right; }

/* --- Blog Specific --- */
.blog-content { font-size: 1.05rem; }
.blog-content h2 { margin-top: var(--space-lg); color: var(--color-primary-dark); }
.blog-content h3 { margin-top: var(--space-md); }
.blog-content ul, .blog-content ol { margin-bottom: var(--space-sm); }
.blog-content li { margin-bottom: 0.3rem; }
.blog-content img { border-radius: var(--radius-md); margin: var(--space-md) 0; }
.blog-featured-img { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--space-md); }

/* --- Sidebar --- */
.sidebar .sidebar-widget {
  background: var(--color-white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.sidebar .sidebar-widget h3 { font-size: 1.1rem; margin-bottom: var(--space-sm); padding-bottom: var(--space-xs); border-bottom: 2px solid var(--color-primary-light); }
.sidebar .sidebar-widget ul { list-style: none; padding: 0; }
.sidebar .sidebar-widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--color-border); }
.sidebar .sidebar-widget li:last-child { border-bottom: none; }

/* --- Footer --- */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,0.8); padding: var(--space-xl) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h4 { color: var(--color-white); margin-bottom: var(--space-sm); font-size: 1.1rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--space-sm) 0; text-align: center;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}

/* --- Cookie Consent --- */
.cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1a1a2e; color: var(--color-white);
  padding: var(--space-md);
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  display: none;
}
.cookie-consent.visible { display: block; }
.cookie-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1; }
.cookie-inner a { color: var(--color-primary-light); }
.cookie-buttons { display: flex; gap: var(--space-xs); }

/* --- Rating Stars --- */
.star-rating { color: var(--color-star); letter-spacing: 2px; }

/* --- Tag/Badge --- */
.tag {
  display: inline-block; background: var(--color-bg-alt);
  color: var(--color-primary); padding: 0.2rem 0.7rem;
  border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}

/* --- Info Box --- */
.info-box {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-md) 0;
}

/* --- Comparison Table --- */
.comparison-table { width: 100%; border-collapse: collapse; margin: var(--space-md) 0; }
.comparison-table th, .comparison-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.comparison-table th { background: var(--color-primary); color: var(--color-white); font-weight: 600; }
.comparison-table tr:nth-child(even) { background: var(--color-bg); }
.comparison-table tr:hover { background: var(--color-bg-alt); }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #023e8a 100%);
  color: var(--color-white); text-align: center;
  padding: var(--space-xl) 0; position: relative;
}
.cta-section h2 { color: var(--color-white); }
.cta-section p { opacity: 0.9; max-width: 600px; margin: 0 auto var(--space-md); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  /* When toggle is inside nav, pull it out visually */
  .main-nav .nav-toggle {
    position: fixed; top: 18px; right: var(--space-md); z-index: 1002;
    overflow: visible; max-height: none;
  }
  .main-nav {
    position: absolute; top: var(--header-height); left: 0; right: 0;
    background: var(--color-white); box-shadow: var(--shadow-md);
    max-height: 0; overflow: visible; transition: max-height 0.3s;
  }
  .main-nav ul, .main-nav .nav-menu {
    max-height: 0; overflow: hidden; transition: max-height 0.3s;
    flex-direction: column; padding: 0 var(--space-md);
    background: var(--color-white);
  }
  .main-nav.open ul, .main-nav.open .nav-menu { max-height: 500px; padding: var(--space-sm) var(--space-md); box-shadow: var(--shadow-md); }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 0.75rem 0; }
  .header-cta { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: var(--space-lg) 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .author-bio { flex-direction: column; align-items: center; text-align: center; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .top-bar .container { justify-content: center; text-align: center; }
  .result-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .container { padding: 0 var(--space-sm); }
  .section { padding: var(--space-lg) 0; }
  .hero h1 { font-size: 1.7rem; }
  .stat-number { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* --- Print --- */
@media print {
  .site-header, .top-bar, .site-footer, .cookie-consent, .nav-toggle { display: none; }
  .hero { background: none; color: var(--color-text); padding: var(--space-sm) 0; }
  body { font-size: 12pt; }
}
