html{
    scroll-behavior: smooth;
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* حداقل ارتفاع بادی برابر با کل ارتفاع صفحه نمایش باشد */
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    background-color: #f4f4f4;
}

header{
    position: sticky;
    top:0;
    z-index: 1000;
    background: #35424a;
    color: #ffffff;
    min-height: 80px;
    border-bottom: 3px solid #e8491d;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

header .container{
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header ul{
    list-style: none;
    display: flex;

}

header a{
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    display: inline-block;
    padding: 30px 20px;
    transition: 0.3s;

    
}

header .highlight, header .current{
    color: #e8491d;
    font-weight: bold;
}

header a:hover{
    color: #cccccc;
    background-color: #e8491d;

}

/* dropdown menu */
nav ul li {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #35424a;
    padding: 0;
    margin: 0;
    flex-direction: column;
    border-top: 3px solid #e8491d;
    z-index: 9999;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    text-transform: none;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}


/* home section */
.home_page{

    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    border-bottom: #e8491d 1px solid;

}
.home_page .container{
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}
.home_text{
    flex: 1;
}
.home_text h2{
    font-size: 40px;
    line-height: 1.2;
    font-weight: 700;
    color: #222;
}
.home_text p{
    margin-top: 17px;
    font-size: 16px;

}
.start_btn{
    display: inline-block;
    margin-top: 36px;
    background-color: #e8491d;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.start_btn:hover{
    background-color: #cf3e17;
}
.home_image{
    flex: 1;
    text-align: right;
}
.home_image img {
    max-width: 100%;
    height: auto;
}


/* tools section */

.box_page {
    padding: 80px 0;
    min-height: calc(100vh - 150px);
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.box_page .container {
  width: 80%;
  padding: 20px;

}

.box_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 25px;
  
}

.box {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #e8491d;
  padding: 30px;
  min-height: 120px; 
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}


.box:hover {
    background-color: #e8491d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}



/* footer */

footer{
    background: #35424a;
    color: #ffffff;
    min-height: 80px;
    padding: 35px;
    border-top: 3px solid #e8491d; 
    margin-top: auto;


}
footer div{
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;

}


/* about page */
.about-section {
  background: #f4f4f4;
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.about-section .container{
    margin: 0 auto;
}

.about-content {
  background: #ffffff;
  border-left: 5px solid #e8491d;
  padding: 35px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.about-content h1 {
  color: #35424a;
  font-size: 38px;
  margin-bottom: 20px;
}

.about-content p {
  font-size: 18px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px;
}


/* =========================================
   استایل‌های اختصاصی صفحات ابزارهای مبدل
   ========================================= */

.tool_page {
    padding: 50px 0;
    flex: 1;
    min-height: 60vh; /* تا اگر محتوا کم بود، فوتر نچسبد به بالا */

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool_header {
    text-align: center;
    margin-bottom: 40px;
}

.tool_header h1 {
    color: #35424a; /* رنگ اصلی هدر سایت شما */
    margin-bottom: 10px;
}

.tool_workspace {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.input_box, .output_box {
    flex: 1; /* هر دو کادر نصف صفحه را می‌گیرند */
    display: flex;
    flex-direction: column;
}

.input_box label, .output_box label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #35424a;
}

/* استایل کادرهای متنی */
.tool_workspace textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical; /* فقط در ارتفاع قابل تغییر باشند */
    font-family: inherit;
    background-color: #fff;
    transition: 0.3s;
}

.tool_workspace textarea:focus {
    outline: none;
    border-color: #e8491d; /* نوار نارنجی سایت شما هنگام فوکوس */
}

.output_box textarea {
    background-color: #f9f9f9;
    color: #555;
}

.tool_actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* بهینه‌سازی کلاس start_btn برای تگ button */
button.tool_btn {
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-top: 0; /* خنثی کردن مارجین دکمه در فایل اصلی */
}

/* رنگ‌بندی دکمه‌های فرعی */
button.tool_btn.secondary {
    background-color: #35424a; /* دکمه به رنگ تیره هدر */
}
button.tool_btn.secondary:hover {
    background-color: #2c363d;
}

button.tool_btn.danger {
    background-color: #dc3545; /* دکمه قرمز برای پاک کردن */
}
button.tool_btn.danger:hover {
    background-color: #c82333;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .tool_workspace {
        flex-direction: column; /* در موبایل کادرها زیر هم قرار می‌گیرند */
    }
    .tool_workspace textarea {
        height: 180px;
    }
    .tool_actions {
        flex-direction: column;
    }
    .tool_actions button {
        width: 100%;
    }
}























































































/* homepage responsive */


@media (max-width: 768px){
  .home_page .container {
    flex-direction: column;
    text-align: center;
  }

  .home_text h2 {
    font-size: 36px;
    margin-top: 40px;
  }

  .home_image {
    text-align: center;
  }
}


/* boxes responsive */

@media (max-width: 900px) {
  .box_grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .box_grid {
    grid-template-columns: 1fr;
  }
}

