/* -----------------------------------------------------------
   ROOT VARIABLES
----------------------------------------------------------- */
:root {
  --global-font: 'PT Sans', sans-serif;
  --primary: #ffffff;
  --secondary: #000000;
  --primary_grey: #c9c9c9;
  --secondary_grey: #494949;
  --red: #f77272;
  --accent: #084b77;

  /* NEW: Additional Semantic Colors for New Sections */
  --hero-bg-gradient-start: #e0f2f7;   /* Lighter blue, inspired by --accent */
  --hero-bg-gradient-end: #c1e4f2;     /* Slightly darker blue for gradient */
  --card-bg: var(--primary);           /* Use --primary for new card/bubble backgrounds */
  --box-shadow-light: rgba(0,0,0,0.05);  /* Lighter shadow for general use */
  --box-shadow-medium: rgba(0,0,0,0.08); /* Medium shadow for hover/prominence */
  --box-shadow-dark: rgba(0,0,0,0.15);   /* Darker shadow for strong depth */
}

/* -----------------------------------------------------------
   BASE + RESET
----------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--global-font);
  background: var(--accent);
  color: var(--secondary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 0.95rem;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--red); }

body.homepage {
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* -----------------------------------------------------------
   HEADER & NAVIGATION
----------------------------------------------------------- */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: relative;
}
.header-nav .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.logo img {
  max-height: 40px;
  width: auto;
  vertical-align: middle;
}
.burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--accent); z-index: 1001; }
.nav-links { display: flex; gap: 0.5rem; list-style: none; padding-left: 0; margin: 0; }
.nav-links .button { background: none; color: var(--secondary_grey); border: 1px solid transparent; }
.nav-links .button:hover, .nav-links .button.active { background: var(--accent); color: var(--primary); border-color: var(--accent); }

/* -----------------------------------------------------------
   MAIN CONTENT & WRAPPERS
----------------------------------------------------------- */
main { flex-grow: 1; display: flex; flex-direction: column; align-items: center; }

.content-wrapper {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
}

.header-tagline {
  text-align: center;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--secondary_grey);
}
h2 { font-size: 1.75rem; color: var(--secondary); font-weight: 800; letter-spacing: -0.5px; margin-bottom: 1.5rem; margin-top: 0.5rem; }

/* -----------------------------------------------------------
   FEATURES SECTION (Existing - ensure it's not conflicting)
----------------------------------------------------------- */
.features {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}
.feature-item {
  flex: 1;
  padding: 1rem;
}
.feature-item h4 {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.feature-item p {
  line-height: 1.6;
  color: var(--secondary_grey);
}
.feature-quote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--secondary);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

/* -----------------------------------------------------------
   ABOUT ME & COMING SOON (Existing - ensure it's not conflicting)
----------------------------------------------------------- */
.about-me {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
}
.about-me-image img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.about-me-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.about-me-text p {
  line-height: 1.6;
  margin-bottom: 1rem;
}
.coming-soon {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #eee;
}

/* -----------------------------------------------------------
   BUBBLES & BUTTONS (Existing - ensure it's not conflicting)
----------------------------------------------------------- */
.bubble { /* Base bubble style, applies to example sites */
    background: var(--primary); /* White bubble background */
    border: 1px solid var(--accent); /* Accent border */
    border-radius: 16px; /* Matches your existing bubble radius */
    box-shadow: 0 4px 12px var(--box-shadow-medium); /* Matches your existing bubble shadow */
    padding: 1.5rem;
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow .2s, border-color .2s, transform 0.2s;
}
.bubble:hover {
    box-shadow: 0 8px 24px var(--box-shadow-dark);
    border-color: var(--red);
    transform: translateY(-5px); /* Lifts on hover */
}
.bubble img { width: 80px; height: 80px; object-fit: cover; border-radius: 16px; margin-bottom: 1rem; }
.bubble .button { margin-top: 1.25rem; }

.button {
    display: inline-block;
    border: none;
    outline: none;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: var(--primary);
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    margin: 0.25rem;
    transition: background .18s, color .18s, border-color .18s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-decoration: none;
}
.button:hover{ background: var(--red); color: var(--primary); text-decoration: none; }
.button-disabled,
.button-disabled:hover {
    background-color: #e9e9e9;
    color: var(--secondary_grey);
    cursor: not-allowed;
    box-shadow: none;
}

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */
footer {
    background: var(--primary);
    color: var(--secondary_grey);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    margin-top: 2rem; /* Restore margin-top for general use if not handled by sections */
    width: 100%;
}
footer a { color: var(--accent); text-decoration: none; font-weight: bold; }
footer a:hover { color: var(--red); text-decoration: underline; }


/* -----------------------------------------------------------
   NEW: Global Container for Content Width
----------------------------------------------------------- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -----------------------------------------------------------
   NEW: Section Headings
----------------------------------------------------------- */
.section-heading {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.section-subheading {
    font-size: 1.2rem;
    color: var(--secondary_grey);
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------------------------
   NEW: Hero Section
----------------------------------------------------------- */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(to bottom, var(--hero-bg-gradient-start), var(--hero-bg-gradient-end));
    padding: 80px 0;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.1;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--secondary_grey);
    margin-bottom: 2rem;
}

.hero-button {
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    border-radius: 16px;
    background-color: var(--accent);
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s;
    box-shadow: 0 2px 5px var(--box-shadow-light);
}

.hero-button:hover {
    background-color: var(--red);
    transform: translateY(-2px);
}

.hero-image {
    width: 90%;
    max-width: 800px;
}
.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px var(--box-shadow-dark);
}

/* -----------------------------------------------------------
   NEW: AI Features Section
----------------------------------------------------------- */
.ai-features-section {
    background-color: var(--primary);
    padding: 80px 0;
    text-align: center;
    width: 100%;
}

.ai-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.ai-feature-item {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px var(--box-shadow-medium);
}

.ai-feature-item i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.ai-feature-item h3 {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 15px;
    font-weight: 700;
}

.ai-feature-item p {
    font-size: 1rem;
    color: var(--secondary_grey);
}

/* -----------------------------------------------------------
   REPURPOSED: General Content Sections
----------------------------------------------------------- */
.content-section {
    padding: 80px 0;
    width: 100%;
}

.light-bg {
    background-color: var(--primary_grey);
}

.dark-bg {
    background-color: var(--secondary);
    color: var(--primary);
}

.dark-bg .section-heading,
.dark-bg .section-subheading,
.dark-bg p {
    color: var(--primary);
}

.feature-item-wide {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.feature-item-wide h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.feature-item-wide p {
    font-size: 1.1rem;
    color: var(--secondary_grey);
}

/* -----------------------------------------------------------
   REPURPOSED: Example Sites Section (Uses .bubble)
----------------------------------------------------------- */
.example-sites-section {
    padding: 80px 0;
    background-color: var(--primary);
    text-align: center;
    width: 100%;
}

.example-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.bubble .button {
    background-color: var(--primary_grey);
    color: var(--secondary_grey);
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s;
}

.bubble .button:hover {
    background-color: #dcdcdc;
    transform: translateY(-2px);
}

/* -----------------------------------------------------------
   REPURPOSED: Coming Soon / Call to Action Section
----------------------------------------------------------- */
.coming-soon-section {
    padding: 100px 0;
    text-align: center;
    background-color: var(--secondary);
    color: var(--primary);
    width: 100%;
}

.coming-soon-section .section-heading,
.coming-soon-section .section-subheading {
    color: var(--primary);
}

.cta-button {
    background-color: var(--accent);
    color: var(--primary);
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    border-radius: 16px;
    text-decoration: none;
    display: inline-block;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.2s;
    box-shadow: 0 2px 5px var(--box-shadow-light);
}

.cta-button:hover {
    background-color: var(--red);
    transform: translateY(-2px);
}

/* -----------------------------------------------------------
   TEXT HIGHLIGHTS (Existing)
----------------------------------------------------------- */
.highlight-text {
    background: linear-gradient(to right, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    font-weight: bold;
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1), 0px 0px 1px rgba(0, 0, 0, 0.1);
}

.highlight-text2 {
    background: linear-gradient(to right, var(--red), #ff7e5f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    font-weight: bold;
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1), 0px 0px 1px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------------------------
   NEW: Colorful Section Backgrounds
----------------------------------------------------------- */
.colorful-section-1 {
    background: linear-gradient(to right, #eaf9fb, #d4f0f5);
}

.colorful-section-2 {
    background: linear-gradient(to right, #ffeeda, #ffdec8);
}

.colorful-section-1 h2,
.colorful-section-1 p,
.colorful-section-2 h2,
.colorful-section-2 p {
    color: var(--secondary);
}

/* -----------------------------------------------------------
   IFRAME BUBBLE (Existing)
----------------------------------------------------------- */
.iframe-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.iframe-bubble iframe {
    border: none;
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin-bottom: 15px;
}

/* -----------------------------------------------------------
   ARTICLES LISTING PAGE (articles.php)
----------------------------------------------------------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid for cards */
    gap: 30px; /* Space between article cards */
    padding: 20px;
    max-width: 1200px; /* Adjust as needed */
    margin: 40px auto; /* Added margin for overall grid positioning */
}

/* Individual Article Card (MAIN ADJUSTMENTS HERE FOR DESKTOP) */
.article-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 25px; /* Maintain padding for the whole card */
    display: flex;
    flex-direction: column; /* Stack primary sections (title/meta, then image/description) */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Added a subtle shadow */
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1); /* Slightly more prominent shadow on hover */
}

/* New wrapper for image and description to sit side-by-side */
.article-body-content {
    display: flex; /* Make this a flex container */
    align-items: flex-start; /* Align items to the top */
    gap: 20px; /* Space between image and description text */
    margin-top: 15px; /* Space below title/meta */
}


/* Thumbnail container for article cards (DESKTOP) */
.article-thumbnail-container {
    width: 200px; /* Fixed width for the image on desktop */
    height: 150px; /* Fixed height for the image on desktop */
    flex-shrink: 0; /* Prevent the image container from shrinking */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px; /* Slightly rounded corners for the image container */
    /* Removed margin-right as gap handles it now */
}

.article-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px; /* Match container border-radius */
}

/* Article text content (description and button) */
.article-text-content {
    flex-grow: 1; /* Allow content to take remaining space */
    display: flex;
    flex-direction: column; /* Stack summary and button vertically */
}

.article-card h3 {
    margin-top: 0;
    margin-bottom: 5px; /* Slightly reduced margin */
    font-size: 1.5em;
    line-height: 1.2; /* Tighter line height for title */
}

.article-card h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.article-card h3 a:hover {
    color: #83ba50; /* Green on hover */
}

.article-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 0; /* No bottom margin, as .article-body-content handles spacing */
}

.article-card p {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    flex-grow: 1; /* Allows summary to take up available space */
    margin-bottom: 0; /* Remove default paragraph margin, button will handle spacing */
}

.read-more-button {
    display: inline-block;
    background-color: #83ba50; /* Green button */
    color: white;
    padding: 10px 15px;
    border-radius: 16px;
    text-decoration: none;
    margin-top: 15px; /* Space between description and button */
    align-self: flex-start; /* Align button to start of its flex container */
    transition: background-color 0.2s;
}

.read-more-button:hover {
    background-color: #95ca57;
    color: white;
}

/* -----------------------------------------------------------
   RESPONSIVE (Unified and Corrected)
----------------------------------------------------------- */
/* Only show relevant media query part for changes, assume other media queries are as before */

@media (max-width: 767px) { /* Mobile breakpoint */
    /* ARTICLE CARD MOBILE LAYOUT */
    .article-card {
        flex-direction: column; /* Stack everything vertically on mobile */
        align-items: flex-start;
        padding: 15px;
    }

    .article-body-content {
        flex-direction: column; /* Stack image and description vertically on mobile */
        width: 100%; /* Ensure it takes full width */
        gap: 15px; /* Adjust gap for vertical stacking */
        margin-top: 10px; /* Adjust spacing below title/meta on mobile */
    }

    .article-thumbnail-container {
        width: 100%; /* Full width for image on mobile */
        height: 180px; /* Adjust height for mobile thumbnail */
        margin-right: 0; /* Remove right margin */
        margin-bottom: 0; /* No extra margin here, gap handles it */
        border-bottom: 1px solid #eee; /* Optional: Restore border below image */
        border-radius: 16px 16px 0 0; /* Rounded top corners, sharp bottom for mobile layout */
    }

    .article-thumbnail {
        border-radius: 16px 16px 0 0; /* Match container rounding for mobile */
    }

    .read-more-button {
        align-self: flex-start; /* Ensure button aligns to the left */
        margin-left: 0; /* Remove any previous left margin */
        margin-top: 15px; /* Consistent margin from text */
    }
}

/* -----------------------------------------------------------
   RESPONSIVE (Unified and Corrected)
----------------------------------------------------------- */
@media (max-width: 1480px) { /* Adjust this breakpoint if needed for your header */
  .nav-links { display: none; }
  .burger { display: block; }
  .header-nav .logo {
    position: static;
    transform: none;
    flex-grow: 1;
    text-align: center;
  }
  .nav-auth { flex-shrink: 0; }
  .nav-links.open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    border-top: 1px solid #f0f0f0;
    z-index: 1000;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-links.open li { margin: 0; text-align: center; }
}

@media (max-width: 900px) { /* Tablet and smaller desktop breakpoint */
  .features {
    flex-direction: column;
  }
  .iframe-bubble iframe {
        height: 300px;
  }
}

@media (max-width: 767px) { /* Mobile breakpoint */
    .header-nav {
        padding: 0.75rem 1rem;
    }
    .nav-links.open {
        grid-template-columns: 1fr;
    }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-section { padding: 40px 0; }
    .hero-image { width: 100%; padding: 0 20px; }

    .ai-features-section { padding: 40px 0; }
    .ai-feature-grid {
        gap: 20px;
    }

    .content-section { padding: 40px 0; }
    .section-heading { font-size: 2rem; }
    .section-subheading { font-size: 1rem; }

    .example-sites-section { padding: 40px 0; }
    .bubble {
        margin: 0.75rem auto; /* Center individual bubbles if they become full width */
        width: calc(100% - 40px);
        max-width: unset;
    }

    /* ARTICLE CARD MOBILE LAYOUT */
    .article-card {
        flex-direction: column; /* Stack image and text vertically on mobile */
        align-items: flex-start; /* Align content to the start */
        padding: 15px; /* Reduce padding for smaller screens */
    }

    .article-thumbnail-container {
        width: 100%; /* Full width for image on mobile */
        height: 180px; /* Adjust height for mobile thumbnail */
        margin-right: 0; /* Remove right margin */
        margin-bottom: 15px; /* Add bottom margin for spacing */
        border-bottom: 1px solid #eee; /* Optional: Restore the border below image */
        border-radius: 16px; /* Rounded top corners, sharp bottom for mobile layout */
    }

    .article-thumbnail {
        border-radius: 16px; /* Match container rounding for mobile */
    }

    .read-more-button {
        align-self: flex-start; /* Ensure button aligns to the left */
        margin-left: 0; /* Remove any previous left margin */
    }
}