/* ============================================================
   confrontotablet.it - Main Stylesheet
   CSS Prefix: ct-
   ============================================================ */

/* --- Variables --- */
:root {
  --ct-navy: #1e2d3d;
  --ct-navy-light: #2a3f54;
  --ct-navy-dark: #152232;
  --ct-orange: #e8601c;
  --ct-orange-light: #f4873f;
  --ct-orange-dark: #c94e12;
  --ct-bg: #f5f7fa;
  --ct-card-bg: #ffffff;
  --ct-text: #2c3e50;
  --ct-text-muted: #6c7a89;
  --ct-text-light: #8e9aab;
  --ct-border: #dce1e8;
  --ct-success: #27ae60;
  --ct-warning: #f39c12;
  --ct-max-width: 1140px;
  --ct-font-heading: 'Montserrat', 'Segoe UI', sans-serif;
  --ct-font-body: 'Open Sans', 'Segoe UI', sans-serif;
  --ct-radius: 8px;
  --ct-radius-lg: 12px;
  --ct-shadow: 0 2px 12px rgba(30, 45, 61, 0.08);
  --ct-shadow-hover: 0 8px 24px rgba(30, 45, 61, 0.14);
  --ct-transition: 0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ct-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ct-text);
  background: var(--ct-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ct-orange); text-decoration: none; transition: color var(--ct-transition); }
a:hover { color: var(--ct-orange-light); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ct-font-heading);
  color: var(--ct-navy);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }

/* --- Container --- */
.ct-container {
  max-width: var(--ct-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header --- */
.ct-header {
  background: var(--ct-navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ct-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--ct-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: auto;
  padding: 0.5rem 0;
}
.ct-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.ct-logo img {
  height: 80px;
  width: auto;
}

/* --- Navigation --- */
.ct-nav { display: flex; align-items: center; gap: 0.25rem; }
.ct-nav-item {
  position: relative;
}
.ct-nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--ct-font-heading);
  border-radius: var(--ct-radius);
  transition: all var(--ct-transition);
  white-space: nowrap;
}
.ct-nav-link:hover,
.ct-nav-item:hover > .ct-nav-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.ct-nav-arrow {
  font-size: 0.6rem;
  transition: transform var(--ct-transition);
}
.ct-nav-item:hover .ct-nav-arrow { transform: rotate(180deg); }

/* Dropdown */
.ct-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow-hover);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--ct-transition);
  z-index: 100;
}
.ct-nav-item:hover .ct-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ct-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--ct-text);
  font-size: 0.88rem;
  transition: all var(--ct-transition);
}
.ct-dropdown a:hover {
  background: var(--ct-bg);
  color: var(--ct-orange);
  padding-left: 1.25rem;
}

/* Hamburger */
.ct-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.ct-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--ct-transition);
}

/* --- Hero --- */
.ct-hero {
  background: linear-gradient(135deg, var(--ct-navy) 0%, var(--ct-navy-light) 100%);
  color: #fff;
  padding: clamp(4rem, 10vw, 7rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.ct-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 45, 61, 0.88) 0%, rgba(42, 63, 84, 0.82) 100%);
  z-index: 1;
}
.ct-hero .ct-container {
  position: relative;
  z-index: 2;
}
.ct-hero h1 {
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ct-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.ct-hero-badge {
  display: inline-block;
  background: var(--ct-orange);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--ct-font-heading);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Breadcrumb --- */
.ct-breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--ct-text-muted);
}
.ct-breadcrumb a { color: var(--ct-text-muted); }
.ct-breadcrumb a:hover { color: var(--ct-orange); }
.ct-breadcrumb span { margin: 0 0.4rem; }

/* --- Section --- */
.ct-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.ct-section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.ct-section-subtitle {
  text-align: center;
  color: var(--ct-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* --- Card Grid --- */
.ct-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.ct-card {
  background: var(--ct-card-bg);
  border-radius: var(--ct-radius-lg);
  box-shadow: var(--ct-shadow);
  overflow: hidden;
  transition: all var(--ct-transition);
  display: flex;
  flex-direction: column;
}
.ct-card:hover {
  box-shadow: var(--ct-shadow-hover);
  transform: translateY(-4px);
}
.ct-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.ct-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ct-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--ct-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ct-orange);
  margin-bottom: 0.5rem;
}
.ct-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.ct-card-body h3 a {
  color: var(--ct-navy);
  transition: color var(--ct-transition);
}
.ct-card-body h3 a:hover { color: var(--ct-orange); }
.ct-card-body p {
  color: var(--ct-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}
.ct-card-footer {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ct-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--ct-font-heading);
  color: var(--ct-orange);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ct-card-link:hover { gap: 0.5rem; }

/* --- Category Grid (homepage) --- */
.ct-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.ct-cat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ct-card-bg);
  border-radius: var(--ct-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--ct-shadow);
  transition: all var(--ct-transition);
  color: var(--ct-text);
  border-left: 3px solid transparent;
}
.ct-cat-card:hover {
  box-shadow: var(--ct-shadow-hover);
  border-left-color: var(--ct-orange);
  color: var(--ct-orange);
  transform: translateX(4px);
}
.ct-cat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.ct-cat-label {
  font-family: var(--ct-font-heading);
  font-weight: 600;
  font-size: 0.92rem;
}

/* --- Article Content --- */
.ct-article {
  background: var(--ct-card-bg);
  border-radius: var(--ct-radius-lg);
  box-shadow: var(--ct-shadow);
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2rem;
}
.ct-article h2 { margin-top: 2rem; }
.ct-article h3 { margin-top: 1.5rem; }
.ct-article ul, .ct-article ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.ct-article ul { list-style: disc; }
.ct-article ol { list-style: decimal; }
.ct-article li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
.ct-article img {
  border-radius: var(--ct-radius);
  margin: 1.5rem 0;
}

/* Updated badge */
.ct-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e8f5e9;
  color: var(--ct-success);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--ct-font-heading);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

/* --- Comparison Table --- */
.ct-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow);
}
.ct-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ct-card-bg);
  font-size: 0.9rem;
}
.ct-table thead {
  background: var(--ct-navy);
  color: #fff;
}
.ct-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--ct-font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.ct-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ct-border);
}
.ct-table tbody tr:nth-child(even) { background: #f8f9fb; }
.ct-table tbody tr:hover { background: #eef1f6; }
.ct-table .ct-rank {
  font-weight: 700;
  color: var(--ct-orange);
  font-family: var(--ct-font-heading);
}

/* --- Product Card --- */
.ct-product {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  background: var(--ct-card-bg);
  transition: border-color var(--ct-transition);
}
.ct-product:hover { border-color: var(--ct-orange); }
.ct-product-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.ct-product-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--ct-radius);
  background: #f8f9fb;
  padding: 0.5rem;
  flex-shrink: 0;
}
.ct-product-info { flex: 1; }
.ct-product-info h3 {
  margin-bottom: 0.25rem;
}
.ct-product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ct-orange);
  font-family: var(--ct-font-heading);
}
.ct-product-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}
.ct-spec {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ct-text-muted);
}
.ct-spec strong {
  color: var(--ct-text);
  font-weight: 600;
}

/* Pro/Con */
.ct-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.ct-pros, .ct-cons {
  padding: 1rem;
  border-radius: var(--ct-radius);
}
.ct-pros { background: #e8f5e9; }
.ct-cons { background: #fdecea; }
.ct-pros h4, .ct-cons h4 {
  font-size: 0.85rem;
  font-family: var(--ct-font-heading);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ct-pros h4 { color: var(--ct-success); }
.ct-cons h4 { color: #c0392b; }
.ct-pros ul, .ct-cons ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ct-pros li::before { content: '+ '; color: var(--ct-success); font-weight: 700; }
.ct-cons li::before { content: '- '; color: #c0392b; font-weight: 700; }
.ct-pros li, .ct-cons li {
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* --- CTA Button --- */
.ct-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--ct-radius);
  font-family: var(--ct-font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--ct-transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.ct-btn-primary {
  background: var(--ct-orange);
  color: #fff;
}
.ct-btn-primary:hover {
  background: var(--ct-orange-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 96, 28, 0.35);
}
.ct-btn-outline {
  background: transparent;
  color: var(--ct-orange);
  border: 2px solid var(--ct-orange);
}
.ct-btn-outline:hover {
  background: var(--ct-orange);
  color: #fff;
}

/* --- FAQ --- */
.ct-faq { margin: 2rem 0; }
.ct-faq-item {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--ct-card-bg);
}
.ct-faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ct-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ct-navy);
  text-align: left;
  transition: background var(--ct-transition);
}
.ct-faq-q:hover { background: var(--ct-bg); }
.ct-faq-q::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--ct-orange);
  flex-shrink: 0;
  transition: transform var(--ct-transition);
}
.ct-faq-item.active .ct-faq-q::after {
  content: '-';
}
.ct-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.ct-faq-item.active .ct-faq-a {
  max-height: 500px;
  padding: 0 1.25rem 1rem;
}
.ct-faq-a p {
  color: var(--ct-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --- Related Guides --- */
.ct-related {
  background: var(--ct-bg);
  border-radius: var(--ct-radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}
.ct-related h2 { margin-top: 0; }
.ct-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.ct-related-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--ct-card-bg);
  border-radius: var(--ct-radius);
  color: var(--ct-text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--ct-transition);
  box-shadow: var(--ct-shadow);
}
.ct-related-link:hover {
  color: var(--ct-orange);
  transform: translateX(4px);
}

/* --- CTA Banner --- */
.ct-cta-banner {
  background: linear-gradient(135deg, var(--ct-navy) 0%, var(--ct-navy-light) 100%);
  color: #fff;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  border-radius: var(--ct-radius-lg);
  margin: 2rem 0;
}
.ct-cta-banner h2 { color: #fff; margin-bottom: 0.75rem; }
.ct-cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

/* --- Footer --- */
.ct-footer {
  background: var(--ct-navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 0;
}
.ct-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--ct-max-width);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}
.ct-footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
}
.ct-footer h4 {
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--ct-font-heading);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ct-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ct-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  transition: all var(--ct-transition);
}
.ct-footer-links a:hover {
  color: var(--ct-orange);
  padding-left: 4px;
}
.ct-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Photo Attribution --- */
.ct-photo-credit {
  font-size: 0.72rem;
  color: var(--ct-text-light);
  text-align: right;
  margin-top: 0.25rem;
}
.ct-photo-credit a {
  color: var(--ct-text-light);
  text-decoration: underline;
}
.ct-photo-credit a:hover { color: var(--ct-orange); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .ct-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .ct-hamburger { display: flex; }
  .ct-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ct-navy);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
  .ct-nav.active { display: flex; }
  .ct-nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
  }
  .ct-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    display: none;
    padding: 0;
  }
  .ct-nav-item.open .ct-dropdown { display: block; }
  .ct-dropdown a {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.5rem;
  }
  .ct-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ct-orange);
  }
  .ct-proscons { grid-template-columns: 1fr; }
  .ct-product-header { flex-direction: column; align-items: center; text-align: center; }
  .ct-product-img { width: 200px; height: 200px; }
  .ct-footer-grid { grid-template-columns: 1fr; }
  .ct-card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ct-article { padding: 1.25rem; }
  .ct-product { padding: 1rem; }
  .ct-product-specs { grid-template-columns: 1fr; }
}
