/*
Theme Name: Janabalawathanaya
Theme URI: http://example.com/janabalawathanaya
Author: Antigravity
Description: Custom WordPress theme for Janabalawathanaya
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: janabalawathanaya
*/

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* TRUE DARK THEME COLORS */
  --color-background-primary: #111111; /* Deep Black */
  --color-background-secondary: #0F3A20; /* Dark Green */
  --color-text-primary: #FFFFFF; /* White Text */
  --color-text-secondary: #D1D5DB; /* Light Grey Text */
  
  --color-dark-green: #0F3A20;
  --color-black: #111111;
  --color-yellow: #FFC107;
  
  --color-border-tertiary: rgba(255, 255, 255, 0.1);
  --border-radius-lg: 12px;
}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font-sans);color:var(--color-text-primary); background: #000000; overflow-x: hidden;}

.wrapper { max-width: 1200px; margin: 0 auto; background: var(--color-background-primary); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

.banner{background:var(--color-yellow);color:var(--color-black);text-align:center;padding:8px 16px;font-size:13px;font-weight:600;}
nav{background:var(--color-black);padding:15px 24px;display:flex;align-items:center;justify-content:space-between; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(255,255,255,0.05);}
.logo{color:var(--color-yellow);font-family:'Playfair Display',serif;font-size:22px;display:flex;align-items:center;gap:7px; cursor: pointer; transition: transform 0.2s;}
.logo:hover { transform: scale(1.02); }
.nav-links{display:flex;gap:16px;align-items:center}
.nav-links a{color:rgba(255,255,255,.8);font-size:13px;font-weight:500;text-decoration:none;cursor:pointer; transition: color 0.2s;}
.nav-links a:hover { color: var(--color-yellow); }
.wa-pill{background:#25D366;color:#fff;padding:6px 14px;border-radius:20px;font-size:12px;font-weight:600;cursor:pointer; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(37,211,102,0.3);}
.wa-pill:hover { background: #1ebd5c; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(37,211,102,0.4); }

.hero{background: linear-gradient(135deg, #000000 0%, var(--color-dark-green) 100%); padding: 70px 24px 110px; text-align:center; position: relative;}
.hero h1{font-family:'Playfair Display',serif;font-size:40px;color:#fff;line-height:1.2;max-width:600px;margin:0 auto 16px; opacity: 0;}
.hero p{color:rgba(255,255,255,.8);font-size:15px;max-width:450px;margin:0 auto 32px;line-height:1.6; opacity: 0;}
.hero-cta{background:var(--color-yellow);color:var(--color-black);padding:14px 28px;border-radius:8px;font-size:15px;font-weight:700;display:inline-block;margin-bottom:40px;cursor:pointer; transition: all 0.3s ease; opacity: 0;}
.hero-cta:hover { background: #FFD54F; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4); }
.hero-img{background:#1A1A1A;border:1px dashed rgba(255,255,255,.2);border-radius:12px;height:350px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(255,255,255,.6);font-size:13px;gap:8px;max-width:800px;margin:0 auto; opacity: 0; transition: background 0.3s; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5);}
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.stats-bar{background:var(--color-background-secondary);border:1px solid rgba(255,255,255,0.1);margin:-50px 30px 0;border-radius:var(--border-radius-lg);padding:24px 20px;display:grid;grid-template-columns:1fr 1fr 1fr;text-align:center;position:relative;z-index:1;box-shadow:0 8px 20px rgba(0,0,0,0.3); opacity: 0;}
.stat-div{border-left:1px solid rgba(255,255,255,0.1); transition: transform 0.3s ease;}
.stat-div:hover { transform: scale(1.05); }
.stat-div:first-child { border-left: none; }
.s-num{font-size:32px;font-weight:700;color:var(--color-yellow);font-family:'Playfair Display',serif}
.s-lbl{font-size:12px;font-weight:600;color:var(--color-text-primary);margin-top:4px; text-transform: uppercase; letter-spacing: 0.05em;}

.about{padding:80px 30px 60px;display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center; opacity: 0;}
.eyebrow{font-size:12px;font-weight:700;color:var(--color-yellow);letter-spacing:.1em;text-transform:uppercase;margin-bottom:10px; display:inline-block; border-bottom: 2px solid var(--color-yellow); padding-bottom: 4px;}
.about h2{font-family:'Playfair Display',serif;font-size:28px;color:var(--color-text-primary);margin-bottom:16px}
.about p{font-size:15px;line-height:1.7;color:var(--color-text-secondary);margin-bottom:14px}
.read-more{font-size:14px;color:var(--color-yellow);font-weight:700;text-decoration:none;cursor:pointer; display: inline-flex; align-items: center; gap: 4px; transition: gap 0.2s;}
.read-more:hover { gap: 8px; color: #fff; }

.about-img{background:#1A1A1A;border:1px dashed var(--color-border-tertiary);border-radius:var(--border-radius-lg);height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--color-text-secondary);font-size:13px;gap:8px; transition: transform 0.3s ease; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.3);}
.about-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }


/* --- PROJECT CARDS SECTION --- */
.projects{background:var(--color-background-secondary);padding:80px 30px; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);}
.sec-head{text-align:center;margin-bottom:60px; opacity: 0; max-width: 800px; margin-left: auto; margin-right: auto;}
.sec-head h2{font-family:'Playfair Display',serif;font-size:32px;color:var(--color-text-primary); margin-bottom: 12px;}
.sec-head p{font-size:15px;color:var(--color-text-secondary);line-height:1.6;}

.proj-grid{display:flex; flex-direction:column; gap:60px; max-width: 900px; margin: 0 auto;}

.proj-card{
  display:flex;
  flex-direction: column; 
  gap: 15px;
  background:transparent; 
  border: none;
  opacity: 0; 
  cursor: pointer;
  transition: transform 0.3s ease;
}
.proj-card:hover { 
  transform: translateY(-5px); 
}

/* The Title sitting OUTSIDE the bordered box */
.outside-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  padding-left: 10px;
}

/* THE YELLOW SQUARE CONTAINER */
.proj-inner-container {
  display: flex;
  align-items: stretch;
  gap: 15px;
  border: 1px solid var(--color-yellow);
  background: #000000; 
  border-radius: 20px;
  padding: 15px;
  transition: all 0.3s ease;
  box-shadow:0 8px 25px rgba(0,0,0,0.4); 
}
.proj-card:hover .proj-inner-container {
  border-color: var(--color-yellow); 
  box-shadow: 0 15px 35px rgba(0,0,0,0.6); 
}

/* Alternate rows reverse direction for the inner container */
.proj-card:nth-child(even) .proj-inner-container {
  flex-direction: row-reverse;
}

/* --- FIX: THE TEXT BOX (ALL 4 CORNERS CURVED WITH ASH SHADE) --- */
.proj-body{
  flex: 1;
  background: linear-gradient(135deg, #9ca3af 0%, #e5e7eb 50%, #ffffff 100%); /* Clear Ash Shade */
  padding: 40px 30px;
  border-radius: 20px; /* ALL 4 CORNERS CURVED */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proj-img{
  flex: 1;
  min-height: 250px;
  border-radius: 12px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px;gap:6px; transition: background 0.3s; overflow: hidden; background: #000;
}
.proj-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s ease; }
.proj-card:hover .proj-img img { transform: scale(1.05); }

.proj-tag{display:inline-block; align-self: flex-start; font-size:11px;padding:4px 10px;border-radius:6px;margin-bottom:15px;font-weight:700; text-transform: uppercase; letter-spacing: 0.05em;}

.tag-w{background:var(--color-yellow);color:var(--color-black);}
.tag-s{background:#25D366;color:#FFFFFF;}
.tag-i{background:var(--color-black);color:var(--color-yellow); border: 1px solid var(--color-yellow);}

/* Hidden h3 inside because we use outside-title now */
.proj-body h3 { display: none; }

/* FONT COLOUR IS BLACK */
.proj-body p {
  font-size: 15px;
  color: #111111; 
  line-height: 1.7;
  font-weight: 600; /* Bolder font weight for readability on gray */
}

/* Mobile Responsiveness for Cards */
@media (max-width: 768px) {
  .proj-inner-container, .proj-card:nth-child(even) .proj-inner-container {
    flex-direction: column;
    padding: 10px;
  }
  .proj-img { min-height: 220px; }
  .proj-body { padding: 30px 20px; }
}


.contact-sec{background:var(--color-background-primary);padding:70px 30px}
.contact-sec h2{font-family:'Playfair Display',serif;font-size:28px;color:var(--color-yellow);text-align:center;margin-bottom:10px}
.contact-sec .sub{color:rgba(255,255,255,.8);font-size:15px;text-align:center;margin-bottom:40px}
.cta-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px; opacity: 0; max-width: 800px; margin: 0 auto;}
.cta-card{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.1);border-radius:var(--border-radius-lg);padding:35px;text-align:center; transition: all 0.3s ease; cursor: pointer;}
.cta-card:hover { background:rgba(255,255,255,.08); transform: translateY(-5px); border-color: var(--color-yellow); }
.cta-card.wa-card{background:rgba(37,211,102,.05);border-color:rgba(37,211,102,.3)}
.cta-card.wa-card:hover { background:rgba(37,211,102,.15); border-color:#25D366; }
.cta-icon{font-size:36px;margin-bottom:16px;display:block}
.cta-icon.wa{color:#25D366}
.cta-icon.em{color:var(--color-yellow)}
.cta-card h3{color:#fff;font-size:18px;font-weight:600;margin-bottom:10px}
.cta-card p{color:rgba(255,255,255,.7);font-size:14px;margin-bottom:20px;line-height:1.5}
.cta-btn{display:inline-block;padding:12px 24px;border-radius:8px;font-size:14px;font-weight:700;text-decoration:none;cursor:pointer; transition: all 0.3s;}
.wa-btn{background:#25D366;color:#fff}
.wa-btn:hover { background: #1ebd5c; box-shadow: 0 4px 10px rgba(37,211,102,0.4); }
.em-btn{background:var(--color-yellow);color:var(--color-black);border:none;}
.em-btn:hover { background:#FFD54F; box-shadow: 0 4px 10px rgba(255,193,7,0.3); }

footer{background:#000000;color:rgba(255,255,255,.5);text-align:center;padding:24px 24px;font-size:13px; border-top: 1px solid rgba(255,255,255,0.05);}
footer strong{color:var(--color-yellow); font-size: 15px;}
.divider{border-left:1px solid rgba(255,255,255,.2);padding:0 12px; margin-left: 12px;}

/* Modal / Lightbox Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--color-background-primary);
  width: 90%;
  max-width: 1000px;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  position: relative;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 4px solid var(--color-yellow);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #fff;
}
.modal-close:hover {
  background: var(--color-yellow);
  color: var(--color-black);
  transform: scale(1.1);
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--color-yellow);
}
.modal-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.modal-img-placeholder {
  height: 200px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
}
.modal-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
