/* ===============================
   BASE
================================*/

body{
font-family: Arial, sans-serif;
margin:0;
background:#f7fbff;
}


/* ===============================
   NAVBAR
================================*/

.navbar{
display:flex;
align-items:center;
justify-content:space-between;
padding:12px 40px;
background:white;
box-shadow:0 2px 10px rgba(0,0,0,0.1);
position:sticky;
top:0;
z-index:1000;
}


/* LOGO */

.logo{
display:flex;
align-items:center;
gap:10px;
font-size:20px;
font-weight:bold;
color:#2a7de1;
}

.logo img{
width:40px;
height:40px;
border-radius:50%;
}


/* NAV LINKS */

.nav-links{
display:flex;
gap:30px;
align-items:center;
}

.nav-links a{
text-decoration:none;
font-weight:600;
color:#333;
}

.nav-links a:hover{
color:#2a7de1;
}


/* RIGHT SIDE */

.nav-right{
display:flex;
align-items:center;
gap:15px;
flex-direction:row;
}

.login-btn{
background:#ff9800;
border:none;
padding:8px 18px;
border-radius:8px;
color:white;
font-weight:600;
cursor:pointer;
}

.menu{
font-size:22px;
cursor:pointer;
}


/* ===============================
   STORIES PAGE
================================*/

.stories-page{
max-width:1400px;
margin:auto;
padding:60px 20px;
text-align:center;
}

.stories-title{
font-size:32px;
margin-bottom:40px;
}


/* STORIES GRID */

.stories-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:30px;
}


/* ===============================
   STORY CARD
================================*/

.story-card{
background:white;
border-radius:14px;
padding:15px;
box-shadow:0 6px 15px rgba(0,0,0,0.08);
transition:0.2s;
}

.story-card:hover{
transform:translateY(-5px);
box-shadow:0 10px 20px rgba(0,0,0,0.12);
}

.story-card img{
width:100%;
height:240px;
object-fit:cover;
border-radius:10px;
margin-bottom:12px;
}

.story-card h3{
margin:10px 0 5px;
}

.story-card p{
font-size:14px;
margin-bottom:10px;
color:#555;
}

.story-card button{
background:#2a7de1;
color:white;
border:none;
padding:8px 14px;
border-radius:6px;
cursor:pointer;
transition:0.2s;
}

.story-card button:hover{
background:#1e63b7;
}

.story-card a{
text-decoration:none;
}

.read-btn{
display:inline-block;
background:#ff9800;
color:white;
padding:8px 14px;
border-radius:6px;
text-decoration:none;
margin-top:8px;
}

.read-btn:hover{
background:#e68900;
}

/* SEARCH BAR */

.search-box{
width:320px;
padding:10px 14px;
border-radius:8px;
border:1px solid #ddd;
margin-bottom:40px;
font-size:16px;
outline:none;
}

.search-box:focus{
border-color:#ff9800;
box-shadow:0 0 0 2px rgba(255,152,0,0.2);
}

.categories{
display:flex;
gap:10px;
justify-content:center;
margin-bottom:30px;
flex-wrap:wrap;
}

.categories button{
background:white;
border:1px solid #ddd;
padding:8px 14px;
border-radius:20px;
cursor:pointer;
font-weight:600;
}

.categories button:hover{
background:#ff9800;
color:white;
border-color:#ff9800;
}

.load-more{
display:block;
margin:40px auto;
padding:12px 22px;
background:#ff9800;
color:white;
border:none;
border-radius:8px;
font-size:16px;
cursor:pointer;
transition:0.2s;
}

.load-more:hover{
background:#e68900;
transform:scale(1.05);
}

.load-more:disabled{
background:#ccc;
cursor:not-allowed;
transform:none;
}

.user-menu{
position:fixed;
top:0;
right:-300px;   /* completely hidden */
width:256px;
height:100vh;

background:white;
box-shadow:-3px 0 15px rgba(0,0,0,0.15);

padding:20px;

display:flex;
flex-direction:column;
gap:15px;

transition:right 0.3s ease;

z-index:5000;
}

/* when menu opens */

.user-menu.active{
right:0;
}

.user-menu a{
text-decoration:none;
font-weight:600;
color:#333;
padding:8px 0;
border-bottom:1px solid #eee;
}

.user-header{
text-align:center;
margin-bottom:15px;
}

.user-header img{
width:70px;
height:70px;
border-radius:50%;
object-fit:cover;
}

.user-header p{
margin-top:10px;
font-weight:bold;
}

#logout-btn{
background:#ff5252;
border:none;
padding:10px;
border-radius:6px;
color:white;
cursor:pointer;
}

.menu-overlay{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;

background:rgba(0,0,0,0.3);

opacity:0;
pointer-events:none;

transition:opacity 0.3s;

z-index:4000;
}

.menu-overlay.active{
opacity:1;
pointer-events:auto;
}

/* LOGIN DROPDOWN */

.login-wrapper{
position:relative;
}

.login-dropdown{
position:absolute;
top:40px;
right:0;
background:white;
box-shadow:0 4px 15px rgba(0,0,0,0.15);
border-radius:6px;
display:none;
flex-direction:column;
min-width:150px;
z-index:2000;
}

.login-dropdown button{
padding:12px;
border:none;
background:white;
cursor:pointer;
text-align:left;
width:100%;
}

.login-dropdown button:hover{
background:#f5f5f5;
}

/* ===============================
LOGIN POPUP
================================ */

.login-popup{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.55);
display:none;
align-items:center;
justify-content:center;
z-index:9999;
}

.login-popup.active{
display:flex;
}


/* ===============================
POPUP BOX
================================ */

.login-box{
width:720px;
min-height:420px;

background:white;
border-radius:10px;
overflow:hidden;

display:grid;
grid-template-columns:320px 1fr;

box-shadow:0 15px 50px rgba(0,0,0,0.25);

position:relative;
}


/* ===============================
LEFT PANEL
================================ */

.login-left{
background:#2a6edb;
color:white;
padding:40px;

display:flex;
flex-direction:column;
justify-content:center;
}

.login-left h2{
font-size:28px;
margin-bottom:12px;
}

.login-left p{
font-size:15px;
opacity:0.9;
}

.login-illustration{
width:180px;
margin-top:25px;
}


/* ===============================
RIGHT PANEL
================================ */

.login-right{
padding:40px;
display:flex;
flex-direction:column;
justify-content:center;
min-height:420px;
}


/* ===============================
TEXT
================================ */

.login-right h3{
margin-bottom:8px;
font-size:20px;
}

.login-info{
font-size:14px;
color:#777;
margin-bottom:18px;
}


/* ===============================
INPUT
================================ */

.login-right input{
width:100%;
padding:12px;
border:1px solid #ddd;
border-radius:6px;
margin-bottom:15px;
font-size:14px;
}


/* ===============================
BUTTON
================================ */

.login-right button{
width:100%;
padding:12px;

background:#fb641b;
border:none;

color:white;
font-weight:bold;

border-radius:6px;
cursor:pointer;
font-size:15px;

transition:0.2s;

margin-bottom:18px;
}

.login-right button:hover{
background:#e55a14;
}


/* ===============================
CLOSE BUTTON
================================ */

.close-login{
position:absolute;
top:14px;
right:14px;

width:34px;
height:34px;

border-radius:50%;
border:none;

background:white;
color:#444;

font-size:22px;
font-weight:bold;

cursor:pointer;

display:flex;
align-items:center;
justify-content:center;

box-shadow:0 3px 8px rgba(0,0,0,0.15);
transition:0.2s;
}

.close-login:hover{
background:#f2f2f2;
}


/* ===============================
SWITCH LINK
================================ */

.switch-link{
margin-top:8px;
font-size:14px;
color:#555;
text-align:center;
}

.switch-link span{
color:#2a7de1;
font-weight:600;
cursor:pointer;
}

.switch-link span:hover{
text-decoration:underline;
}


/* ===============================
OTP INPUTS
================================ */

.otp-box{
display:flex;
gap:10px;
margin:15px 0;
justify-content:center;
}

.otp-input{
width:45px;
height:50px;

font-size:20px;
text-align:center;

border:1px solid #ccc;
border-radius:6px;
}

.otp-input:focus{
border:2px solid #2a7de1;
outline:none;
}


/* ===============================
OTP RESEND
================================ */

.otp-resend{
text-align:center;
margin-top:10px;
font-size:14px;
color:#666;
}

#resend-otp{
background:none;
border:none;
color:#2a7de1;
cursor:pointer;
font-weight:bold;
}