/* ==========================================================================
   Web Hosting Ireland — Main Stylesheet
   Company: Irish Web Services, Dublin, Ireland
   Color palette derived from original 2003-2008 site
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary: #2B5797;
  --color-accent: #3366CC;
  --color-light-blue: #bcd1e3;
  --color-pale-blue: #e8f0f7;
  --color-cream: #FFFFF2;
  --color-dark: #292929;
  --color-gray-700: #444444;
  --color-gray-500: #666666;
  --color-gray-400: #888888;
  --color-gray-300: #aaaaaa;
  --color-gray-200: #cccccc;
  --color-gray-100: #eeeeee;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
    "Courier New", Courier, monospace;

  --header-height: 70px;
  --max-width: 1200px;
  --radius: 6px;
  --radius-lg: 10px;
  --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);
  --transition: 0.25s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  color: var(--color-dark);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--color-primary);
}

p a,
li a,
td a,
dd a {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.5em;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.65rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
  margin-bottom: 1em;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-white { color: var(--color-white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
}

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

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

/* ---------- Desktop Navigation ---------- */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-dark);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a:focus {
  background: var(--color-pale-blue);
  color: var(--color-primary);
}

.main-nav a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav toggle — CSS-only via checkbox */
.nav-toggle {
  display: none;
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-white);
  padding: 70px 20px;
  text-align: center;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.6rem;
  margin-bottom: 0.4em;
}

.hero .subtitle {
  font-size: 1.2rem;
  opacity: 0.92;
  margin-bottom: 1.8em;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
}

/* ---------- Page Header (interior pages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3f6f 100%);
  color: var(--color-white);
  padding: 48px 20px;
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 2.2rem;
  margin-bottom: 0.3em;
}

.page-header p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---------- Section ---------- */
.section {
  padding: 60px 0;
}

.section--alt {
  background: var(--color-pale-blue);
}

.section--cream {
  background: var(--color-cream);
}

.section-title {
  text-align: center;
  margin-bottom: 1.6em;
}

.section-title h2 {
  margin-bottom: 0.3em;
}

.section-title p {
  color: var(--color-gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  padding: 0;
}

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 0.5em;
}

.card p {
  color: var(--color-gray-500);
  font-size: 0.95rem;
}

/* Card icon — CSS shape circle */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-pale-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

/* ---------- Feature Grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 50px;
}

.feature-item {
  display: flex;
  gap: 16px;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--color-pale-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.feature-content h3 {
  margin-bottom: 0.3em;
  font-size: 1.1rem;
}

.feature-content p {
  color: var(--color-gray-500);
  font-size: 0.93rem;
  margin-bottom: 0;
}

/* ---------- Pricing Table ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pricing-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gray-100);
  text-align: center;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card--featured {
  border-color: var(--color-accent);
  position: relative;
}

.pricing-card--featured::before {
  content: "Popular";
  position: absolute;
  top: 16px;
  right: -30px;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 4px 40px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  transform: rotate(45deg);
}

.pricing-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 24px 20px;
}

.pricing-card--featured .pricing-header {
  background: var(--color-accent);
}

.pricing-header h3 {
  color: var(--color-white);
  margin-bottom: 0.2em;
  font-size: 1.3rem;
}

.price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-white);
}

.price-period {
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  padding: 20px;
  margin: 0;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 0.93rem;
  color: var(--color-gray-700);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-footer {
  padding: 0 20px 24px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- Comparison Table ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 700px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--color-gray-200);
}

.comparison-table thead th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}

.comparison-table thead th:first-child {
  text-align: left;
}

.comparison-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  background: var(--color-pale-blue);
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--color-cream);
}

.comparison-table tbody tr:hover {
  background: var(--color-light-blue);
}

.check {
  color: var(--color-success);
  font-weight: 700;
}

.cross {
  color: var(--color-gray-300);
}

/* ---------- FAQ / Accordion ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-gray-200);
  padding: 20px 0;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
  color: var(--color-primary);
}

.faq-item p {
  color: var(--color-gray-500);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Contact Form ---------- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.93rem;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  font-family: var(--font-stack);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(51, 102, 204, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---------- Two-column layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.two-col--wide-left {
  grid-template-columns: 2fr 1fr;
}

.two-col--wide-right {
  grid-template-columns: 1fr 2fr;
}

/* ---------- Blog List ---------- */
.blog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  list-style: none;
  padding: 0;
}

.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.blog-card h3 {
  margin-bottom: 0.4em;
}

.blog-card h3 a {
  text-decoration: none;
  color: var(--color-primary);
}

.blog-card h3 a:hover {
  color: var(--color-accent);
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--color-gray-400);
  margin-bottom: 0.8em;
}

.blog-card p {
  color: var(--color-gray-500);
  font-size: 0.93rem;
}

/* ---------- Blog Article ---------- */
.article-content {
  max-width: 780px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 1.8em;
}

.article-content h3 {
  margin-top: 1.4em;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1em;
}

.article-content li {
  margin-bottom: 0.3em;
}

.article-content code {
  background: var(--color-pale-blue);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.article-content pre {
  background: var(--color-dark);
  color: #e0e0e0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.2em;
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--color-gray-400);
  margin-bottom: 1.5em;
}

.breadcrumb a {
  text-decoration: underline;
}

/* ---------- Info Box ---------- */
.info-box {
  background: var(--color-pale-blue);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.2em;
}

.info-box p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
  padding: 30px 0;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.85;
  color: var(--color-white);
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 50px 20px;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 0.4em;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 1.5em;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-gray-300);
  padding: 50px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-about p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1em;
}

.footer-about .footer-email a {
  color: var(--color-light-blue);
  text-decoration: underline;
}

.site-footer h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1em;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--color-gray-300);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-gray-400);
}

/* ---------- 404 Page ---------- */
.error-page {
  text-align: center;
  padding: 80px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-light-blue);
  line-height: 1;
  margin-bottom: 0.2em;
}

.error-page p {
  color: var(--color-gray-500);
  max-width: 460px;
  margin: 0 auto 1.5em;
}

/* ---------- Privacy / Legal ---------- */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: 1.8em;
}

.legal-content h3 {
  margin-top: 1.3em;
}

/* ---------- Contact Info Side ---------- */
.contact-info-card {
  background: var(--color-pale-blue);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.contact-info-card h3 {
  margin-bottom: 1em;
}

.contact-info-card p {
  font-size: 0.93rem;
  margin-bottom: 1em;
}

.contact-info-card strong {
  color: var(--color-dark);
}

/* =============================================
   RESPONSIVE — Tablet (max-width: 768px)
   ============================================= */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Hide desktop nav by default */
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: 20px;
  }

  .nav-toggle:checked ~ .main-nav {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .main-nav a {
    font-size: 1.05rem;
    padding: 12px 16px;
  }

  /* Layout adjustments */
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .hero { padding: 50px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1.05rem; }

  .section { padding: 40px 0; }

  .card-grid,
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .two-col,
  .two-col--wide-left,
  .two-col--wide-right {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .page-header {
    padding: 36px 20px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}

/* =============================================
   RESPONSIVE — Mobile (max-width: 480px)
   ============================================= */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .hero { padding: 36px 16px; }
  .hero h1 { font-size: 1.65rem; }
  .hero .subtitle { font-size: 0.95rem; }

  .section { padding: 30px 0; }
  .container { padding: 0 16px; }

  .card-grid,
  .card-grid--2,
  .card-grid--4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 22px 18px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-about {
    grid-column: auto;
  }

  .cta-banner {
    padding: 36px 16px;
  }

  .pricing-card--featured::before {
    top: 12px;
    right: -32px;
    font-size: 0.7rem;
  }

  .logo-text {
    font-size: 0.85rem;
  }

  .logo img {
    height: 32px;
  }

  .comparison-table {
    font-size: 0.82rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .hamburger,
  .nav-toggle,
  .cta-banner {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero {
    background: none;
    color: #000;
    padding: 20px 0;
  }

  .hero h1 {
    color: #000;
  }

  .section {
    padding: 20px 0;
  }
}
