/*
Theme Name: SwissTamilDirectory
Theme URI: https://www.swisstamil24.com
Author: SwissTamilMedia GmbH
Author URI: https://www.swisstamilmedia.com
Description: Custom mobile-friendly, SEO-ready Business Directory & Classified Listing theme for SwissTamil24.com. Red & Black design, 26-Kanton location browsing, multi-category listings, and a built-in Ad Panel.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: swisstamildirectory
Tags: directory, classifieds, business-directory, red, black, two-columns, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   CSS RESET / BASE
========================================================= */
:root{
	--st-red:#d0021b;
	--st-red-dark:#a3010f;
	--st-black:#161616;
	--st-black-soft:#222222;
	--st-gray:#6b6b6b;
	--st-light:#f5f5f5;
	--st-border:#e6e6e6;
	--st-white:#ffffff;
	--st-radius:8px;
	--st-shadow:0 2px 10px rgba(0,0,0,.08);
	--st-font: 'Poppins','Noto Sans Tamil',Arial,Helvetica,sans-serif;
}
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{
	margin:0;
	font-family:var(--st-font);
	color:var(--st-black-soft);
	background:var(--st-white);
	line-height:1.6;
	font-size:16px;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--st-red);text-decoration:none;transition:.2s;}
a:hover{color:var(--st-red-dark);}
ul{list-style:none;margin:0;padding:0;}
h1,h2,h3,h4{font-weight:700;color:var(--st-black);line-height:1.3;margin:0 0 .5em;}
.container{max-width:1200px;margin:0 auto;padding:0 16px;}
.btn{
	display:inline-block;
	background:var(--st-red);
	color:#fff;
	padding:10px 22px;
	border-radius:var(--st-radius);
	font-weight:600;
	border:2px solid var(--st-red);
	cursor:pointer;
}
.btn:hover{background:var(--st-red-dark);border-color:var(--st-red-dark);color:#fff;}
.btn-outline{background:transparent;color:#fff;border:2px solid #fff;}
.btn-outline:hover{background:#fff;color:var(--st-black);}
.btn-black{background:var(--st-black);border-color:var(--st-black);}
.btn-black:hover{background:#000;border-color:#000;}
.section{padding:48px 0;}
.section-title{text-align:center;margin-bottom:8px;font-size:28px;}
.section-sub{text-align:center;color:var(--st-gray);margin-bottom:32px;}
.section-title span{color:var(--st-red);}
.badge{
	display:inline-block;background:var(--st-red);color:#fff;font-size:11px;
	padding:2px 8px;border-radius:20px;font-weight:600;letter-spacing:.5px;
}
.badge-black{background:var(--st-black);}
.skip-link{position:absolute;left:-9999px;top:0;background:#fff;padding:8px;z-index:9999;}
.skip-link:focus{left:8px;}

/* =========================================================
   HEADER
========================================================= */
.st-topbar{background:var(--st-black);color:#ddd;font-size:13px;padding:6px 0;}
.st-topbar .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;}
.st-topbar a{color:#ddd;}
.st-topbar a:hover{color:var(--st-red);}
.st-topbar .st-topbar-contact span{margin-right:16px;white-space:nowrap;}
.st-topbar .st-topbar-contact i,.st-topbar .st-topbar-contact svg{margin-right:4px;}

.site-header{background:#fff;box-shadow:var(--st-shadow);position:sticky;top:0;z-index:500;}
.site-header .container{display:flex;align-items:center;justify-content:space-between;padding-top:12px;padding-bottom:12px;gap:16px;}
.site-logo{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:800;color:var(--st-black);}
.site-logo img{max-height:52px;width:auto;}
.site-logo span{color:var(--st-red);}

.main-navigation{display:flex;align-items:center;gap:22px;}
.main-navigation ul{display:flex;gap:22px;}
.main-navigation a{color:var(--st-black-soft);font-weight:600;font-size:15px;}
.main-navigation a:hover,.main-navigation .current-menu-item>a{color:var(--st-red);}
.header-actions{display:flex;align-items:center;gap:12px;}
.menu-toggle{display:none;background:none;border:none;font-size:26px;color:var(--st-black);cursor:pointer;}

@media(max-width:900px){
	.main-navigation{position:fixed;top:0;right:-280px;width:280px;height:100vh;background:#fff;flex-direction:column;align-items:flex-start;padding:80px 24px 24px;box-shadow:-4px 0 20px rgba(0,0,0,.15);transition:.3s;overflow-y:auto;}
	.main-navigation.is-open{right:0;}
	.main-navigation ul{flex-direction:column;gap:16px;width:100%;}
	.menu-toggle{display:block;}
	.st-topbar .st-topbar-contact span:not(:first-child){display:none;}
}

/* =========================================================
   HERO / SEARCH
========================================================= */
.st-hero{
	background:linear-gradient(135deg,var(--st-black) 0%,var(--st-red-dark) 55%,var(--st-red) 100%);
	color:#fff;padding:56px 0 90px;text-align:center;
}
.st-hero h1{color:#fff;font-size:32px;margin-bottom:10px;}
.st-hero p{color:#f1d5d5;max-width:640px;margin:0 auto 28px;}
.st-search-form{
	background:#fff;border-radius:var(--st-radius);padding:14px;display:flex;gap:10px;
	max-width:900px;margin:0 auto;box-shadow:0 10px 30px rgba(0,0,0,.25);flex-wrap:wrap;
}
.st-search-form input[type=text],.st-search-form select{
	flex:1 1 180px;height:46px;line-height:1.2;padding:0 14px;border:1px solid var(--st-border);
	border-radius:6px;font-size:14px;color:#333;background:#fff;
	-webkit-appearance:none;appearance:none;
}
.st-search-form select{
	background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23888'/></svg>");
	background-repeat:no-repeat;background-position:right 14px center;padding-right:30px;
}
.st-search-form button{flex:0 0 auto;height:46px;padding:0 24px;}

/* Compact, thumb-friendly search on mobile */
@media(max-width:640px){
	.st-hero{padding:32px 0 46px;}
	.st-hero h1{font-size:22px;}
	.st-hero p{font-size:14px;margin-bottom:18px;}
	.st-search-form{
		display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border-radius:10px;
	}
	.st-search-form input[type=text]{grid-column:1 / -1;}
	.st-search-form input[type=text],.st-search-form select{height:42px;font-size:13px;padding:0 10px;}
	.st-search-form select{padding-right:24px;background-position:right 8px center;}
	.st-search-form button{grid-column:1 / -1;height:42px;font-size:14px;}
}

/* =========================================================
   CATEGORY / KANTON GRID
========================================================= */
.st-grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));}
.st-cat-card,.st-kanton-card{
	background:#fff;border:1px solid var(--st-border);border-radius:var(--st-radius);
	padding:22px 14px;text-align:center;transition:.2s;box-shadow:var(--st-shadow);
}
.st-cat-card:hover,.st-kanton-card:hover{transform:translateY(-4px);border-color:var(--st-red);}
.st-cat-icon{font-size:34px;margin-bottom:10px;}
.st-cat-card h3,.st-kanton-card h3{font-size:16px;margin:0 0 4px;color:var(--st-black);}
.st-cat-card .count,.st-kanton-card .count{color:var(--st-gray);font-size:13px;}
.st-kanton-card{background:var(--st-black);color:#fff;}
.st-kanton-card h3{color:#fff;}
.st-kanton-card .count{color:#ccc;}
.st-kanton-card:hover{background:var(--st-red);}

/* =========================================================
   LISTING CARDS
========================================================= */
.st-listing-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));}
.st-listing-card{
	background:#fff;border:1px solid var(--st-border);border-radius:var(--st-radius);overflow:hidden;
	box-shadow:var(--st-shadow);transition:.2s;display:flex;flex-direction:column;
}
.st-listing-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.14);}
.st-listing-thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:#fff;display:flex;align-items:center;justify-content:center;padding:18px;}
.st-listing-thumb img{width:100%;height:100%;object-fit:contain;}
.st-listing-thumb .badge{position:absolute;top:10px;left:10px;}
.st-listing-body{padding:16px;flex:1;display:flex;flex-direction:column;gap:6px;}
.st-listing-body h3{font-size:17px;margin:0;}
.st-listing-body h3 a{color:var(--st-black);}
.st-listing-cats{display:flex;flex-wrap:wrap;gap:6px;}
.st-listing-cats a{font-size:11px;background:var(--st-light);color:var(--st-black-soft);padding:2px 8px;border-radius:20px;}
.st-listing-loc{font-size:13px;color:var(--st-gray);}
.st-listing-foot{padding:12px 16px;border-top:1px solid var(--st-border);display:flex;justify-content:space-between;align-items:center;}
.st-listing-foot a.call{color:var(--st-red);font-weight:700;font-size:13px;}

/* =========================================================
   AD BANNER / AD PANEL
========================================================= */
.st-ad-slot{margin:28px 0;text-align:center;}
.st-ad-slot img{margin:0 auto;border-radius:6px;}
.st-ad-placeholder{
	border:2px dashed var(--st-red);border-radius:var(--st-radius);padding:26px;color:var(--st-red);
	background:#fff5f5;font-weight:600;
}

/* =========================================================
   SINGLE LISTING
========================================================= */
.st-listing-hero{background:var(--st-black);color:#fff;padding:32px 0;}
.st-listing-hero h1{color:#fff;font-size:26px;margin-bottom:6px;}
.st-listing-hero .st-listing-cats a{background:rgba(255,255,255,.15);color:#fff;}
.st-single-wrap{display:grid;grid-template-columns:2fr 1fr;gap:32px;padding:32px 0;align-items:start;}
@media(max-width:860px){.st-single-wrap{grid-template-columns:1fr;}}
.st-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:20px;border-radius:var(--st-radius);overflow:hidden;}
.st-gallery img{aspect-ratio:4/3;object-fit:contain;background:#fff;padding:10px;border:1px solid var(--st-border);}
.st-info-panel{
	background:#fff;border:1px solid var(--st-border);border-radius:var(--st-radius);
	padding:20px;box-shadow:var(--st-shadow);position:sticky;top:90px;
}
.st-info-panel h3{border-bottom:2px solid var(--st-red);padding-bottom:8px;margin-bottom:14px;font-size:16px;}
.st-info-row{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px;font-size:14px;}
.st-info-row strong{display:block;color:var(--st-black);}
.st-info-panel .btn{width:100%;text-align:center;margin-bottom:8px;}
.st-map iframe{width:100%;border:0;border-radius:var(--st-radius);margin-top:16px;}

/* =========================================================
   SUBMIT LISTING FORM
========================================================= */
.st-form{max-width:760px;margin:0 auto;background:#fff;border:1px solid var(--st-border);border-radius:var(--st-radius);padding:28px;box-shadow:var(--st-shadow);}
.st-form label{display:block;font-weight:600;margin-bottom:6px;font-size:14px;}
.st-form input[type=text],.st-form input[type=email],.st-form input[type=tel],.st-form input[type=url],.st-form select,.st-form textarea,.st-form input[type=file]{
	width:100%;padding:11px 12px;border:1px solid var(--st-border);border-radius:6px;margin-bottom:18px;font-size:15px;font-family:inherit;
}
.st-form .st-cat-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;margin-bottom:18px;}
.st-form .st-cat-checks label{font-weight:400;display:flex;align-items:center;gap:6px;margin:0;}
.st-form-msg{padding:14px 16px;border-radius:6px;margin-bottom:20px;font-weight:600;}
.st-form-msg.success{background:#e8f8ee;color:#1c7c3f;}
.st-form-msg.error{background:#fdeaea;color:var(--st-red-dark);}

/* =========================================================
   SIDEBAR / WIDGETS
========================================================= */
.widget{background:#fff;border:1px solid var(--st-border);border-radius:var(--st-radius);padding:18px;margin-bottom:20px;}
.widget h3{font-size:16px;border-bottom:2px solid var(--st-red);padding-bottom:8px;margin-bottom:12px;}

/* =========================================================
   FOOTER
========================================================= */
.site-footer{background:var(--st-black);color:#ccc;margin-top:40px;}
.footer-widgets{padding:44px 0 20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:28px;}
.footer-widgets h3{color:#fff;font-size:16px;margin-bottom:14px;position:relative;padding-bottom:8px;}
.footer-widgets h3::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:2px;background:var(--st-red);}
.footer-widgets a{color:#bbb;}
.footer-widgets a:hover{color:var(--st-red);}
.footer-widgets li{margin-bottom:8px;font-size:14px;}
.footer-contact li{display:flex;gap:8px;align-items:flex-start;}
.footer-bottom{border-top:1px solid #2b2b2b;padding:18px 0;text-align:center;font-size:13px;color:#999;}
.footer-bottom .quick-links{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin-bottom:10px;}
.footer-bottom .quick-links a{color:#ccc;}
.footer-bottom .quick-links a:hover{color:var(--st-red);}

/* =========================================================
   MISC / UTIL
========================================================= */
.st-cta{background:var(--st-red);color:#fff;text-align:center;padding:48px 0;}
.st-cta h2{color:#fff;}
.st-cta p{color:#ffe3e3;margin-bottom:20px;}
.pagination{display:flex;justify-content:center;gap:8px;margin-top:28px;}
.pagination a,.pagination span{padding:8px 14px;border:1px solid var(--st-border);border-radius:6px;color:var(--st-black-soft);}
.pagination .current{background:var(--st-red);color:#fff;border-color:var(--st-red);}
.no-results{text-align:center;padding:60px 0;color:var(--st-gray);}